在VS中直接就输出了 不是非得在一行中显示 这样写没有错误
Console.WriteLine("我的工资奖金总额是{0}元",salary + prize);
Console.WriteLine("我的税后收入是{0}元",salary + prize - tax);
Console.WriteLine("我的工资奖金总额是{0}元",salary + prize);
Console.WriteLine("我的税后收入是{0}元",salary + prize - tax);
2017-06-13
代码没有错误,注意第十二行要这么写(任务中也说了)
int x =(int) d + 1;//将double类型的d强制转换为int类型之后再计算
运行结果:3
int x =(int) d + 1;//将double类型的d强制转换为int类型之后再计算
运行结果:3
2017-06-13
string text=((year%4)==0&&(year%100!=0)||(year%400==0))?"闰年":"平年";
2017-06-13
已采纳回答 / 一念征途
你好,变量名只能由英文字母、数字和下划线组成,不能包含空格和其他字符。所以 sum前面不能加#, 对应的习题中 2个sum 前的# 都需要删除,祝你学习顺序,如果觉得回答不错,就采纳一下吧!<...图片...>
2017-06-13
string[,] scores = {{"吴松", "89"},{"钱东雨", "90"}, {"伏晨", "98"} };
string[] temp = {scores[0,0], scores[0,1]};
for (int i = 0; i < scores.GetLongLength(0); i++){
if (Convert.ToInt32(scores[i,1]) > Convert.ToInt32(temp[1])) {
temp[0] = scores[i,0];temp[1] = scores[i,1];
}
}
string[] temp = {scores[0,0], scores[0,1]};
for (int i = 0; i < scores.GetLongLength(0); i++){
if (Convert.ToInt32(scores[i,1]) > Convert.ToInt32(temp[1])) {
temp[0] = scores[i,0];temp[1] = scores[i,1];
}
}