变量
一个变量只不过是一个供程序操作的存储区的名字。
int i;
i = 100;
与控制台交互
System 命名空间中的 Console 类提供了一个函数 ReadLine(),用于接收来自用户的输入,接收的是String类型。
Convert.ToInt(data)
用来转换成数值类型
String s;
s = Console.ReadLine();
Console.WriteLine(s);
Console.WriteLine(Convert.ToInt32(s));
image.png