【发布时间】:2015-05-30 18:29:28
【问题描述】:
我需要什么计算才能找到总数?
else if (a =2) {
TotalCredit = new int[15];
Console.WriteLine("please enter the credits");
int i = 0;
for (i = 0; i < 15; i++) {
int Credit = Convert.ToInt32(Console.ReadLine());
Total + Credit;
}
Console.WriteLine(Total);
}
【问题讨论】:
-
你确定你的意思是
a=2而不是a==2?? -
您希望
Total + Credit;单独作为声明做什么?你的意思是TotalCredit += Credit;吗? (您还应该查找 .NET 命名约定...)