3D游戏编程入门经典(5)

安之若素 分享 2021-06-02 下载文档

{

console.write("hello world c#!\r\nplease enter your name:");

string name = console.readline();

console.write("hello {0}, please enter the year you were born:", name);

int year = int.maxvalue;

while(year == int.maxvalue)

{

try

{

year = int.parse(console.readline());

}

catch (formatexception)

{

console.write("you did not enter a valid number. ");

console.writeline("please enter an integer, such as 1975. ");

}

}

console.writeline("you must be approximately {0} years old! ",

datetime.now.year-year);

console.writeline("press the key to exit the application");

console.read();

}


3D游戏编程入门经典(5).doc 将本文的Word文档下载到电脑

下一篇:C15048互联网金融的发展趋势 课后测验

相关推荐
相关阅读
本类排行
× 游客快捷下载通道(下载后可以自由复制和排版)

下载本文档需要支付 7

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:xxxxxx QQ:xxxxxx