实现以下要求
int zf;
double pjf;
Console.WriteLine("请输入名字");
string name = Console.ReadLine();
Console.WriteLine("请输入语文成绩");
string ch = Console.ReadLine();
Console.WriteLine("请输入数学成绩");
string math=Console.ReadLine();
Console.WriteLine("请输入英语成绩");
string eng = Console.ReadLine();
zf = Convert.ToInt32(ch) + Convert.ToInt32(math) + Convert.ToInt32(eng);
pjf = zf / 3;
Console.WriteLine("您好," + name);
Console.WriteLine("您的总分为:"+zf);
Console.WriteLine("您的平均分为:"+pjf);
Console.ReadKey();
}
网友评论