计算加,减,乘,除
C#控制台:从键盘上输入两个整型数据,计算和,差,积,商?我刚刚入门
static void Main(string[] args)
{
Console.Write("a=");
string a = Console.ReadLine();
Console.Write("b=");
string b = Console.ReadLine();
double x = Convert.ToDouble(a);
double y = Convert.ToDouble(b);
Console.WriteLine("a+b=" + (x + y));
Console.WriteLine("a-b="+ (x-y));
Console.WriteLine("a*b=" + (x * y));
Console.WriteLine("a/b=" + x / y);
Console.ReadKey();
}