关键代码:
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine("请输入第一个整数:");
int a=Convert.ToInt32(Console.ReadLine());
Console.WriteLine("请输入第二个整数:");
int b= Convert.ToInt32( Console.ReadLine());
a += b;
Console.WriteLine("a+=b的值是:{0}", a);
Console.WriteLine("请输入第三个整数:");
int c = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("请输入第四个整数:");
int d = Convert.ToInt32(Console.ReadLine());
c -= d;
Console.WriteLine("c-=d的值是:{0}", c);
Console.WriteLine("请输入第五个整数:");
int e = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("请输入第六个整数:");
int f = Convert.ToInt32(Console.ReadLine());
e *= f;
Console.WriteLine("e *= f的值是:{0}", e);
Console.WriteLine("请输入第七个整数:");
int g = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("请输入第八个整数:");
int h = Convert.ToInt32(Console.ReadLine());
g %= h;
Console.WriteLine("g %= h的值是:{0}", g);
Console.WriteLine("请输入第九个整数:");
int i = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("请输入第十个整数:");
int j = Convert.ToInt32(Console.ReadLine());
i /= j;
Console.WriteLine("i /= j的值是:{0}", i);
Console.ReadKey();
}
评论