using System;
namespace _005_练习题
{
class Program
{
static void Main(string[] args)
{
//int a = Convert.ToInt32(Console.ReadLine());
//int b = Convert.ToInt32(Console.ReadLine());
//int c = a + b;
//Console.WriteLine(c);
int a = Convert.ToInt32(Console.ReadLine());
int b = Convert.ToInt32(Console.ReadLine());
int c = (a + b) / 2;
Console.WriteLine(c);
}
}
}
变量名不能用特殊字符
int a=convert.toint(console.readline());
int b=convert.toint(console.readline());
int c= a+b;
第三题
12356
第四题A
第五题A
@:取消转义字符
例:D://test; 相当于@D:/test;
命名是以字母、数字、下划线组成,不能以数字开头
让用户计算两个整数的和
int a = Convert.ToInt32(Console.ReadLine());
int b = Convert.ToInt32(Console.ReadLine());
int c = a+b;
Console.WriteLine(c);
可以计算乘法,+改成*ha
int a = Convert.ToInt32(Console.ReadLine());