Console.WriteLine("姓名");
string x = Console.ReadLine();
Console.WriteLine("语文");
string y = Console.ReadLine();
Console.WriteLine("数学");
string s = Console.ReadLine();
Console .WriteLine ("英语");
string z =Console .ReadLine();
int y1 = Convert.ToInt32(y);
int s1 = Convert.ToInt32(s);
int z1 = Convert.ToInt32(z);
int sum=Convert .ToInt32(y1+s1+z1);
Console .WriteLine (x+"您的总成绩是{0}分,平均成绩是{1}分",sum,sum/3);
网友评论