using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("请输入你的姓名");
string name = Console.ReadLine();
Console.WriteLine("请输入你的语文成绩");
string str_chinese = Console.ReadLine();
Console.WriteLine("在输入你的数学成绩");
string strMath = Console.ReadLine();//100 90
Console.WriteLine("请输入你的英语成绩");
string strEnglish = Console.ReadLine();
double chinese = Convert.ToDouble(str_chinese);
double math = Convert.ToDouble(strMath);
double english = Convert.ToDouble(strEnglish);
double zongfen = chinese + math + english;
double pingjun = zongfen / 3.0;
Console.WriteLine("{0},你的总成绩为{1}分,平均成绩为{2}", name, zongfen, pingjun);
Console.ReadKey();
}
}
}
网友评论