编写控制台应用程序,分别输入用户的姓名、学号、性别、年龄、身高、体重
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace 数组定义与数组类型{class Program{static void Main(string[] args){string name = \"李锐\"; //字符串类型,中文,数字,标点符号long num = 2017651123; //整数 比int范围更大char sex = \'男\';int age = 19; //整数 21亿float height = 170f; //小数,精确度、范围都比double要小double weight = 115.5;Console.WriteLine();Console.Write(\"请输入姓名;\");name = Console.ReadLine();Console.WriteLine();Console.Write(\"请输入学号;\");num = long.Parse(Console.ReadLine());Console.WriteLine();Console.Write(\"请输入姓别:\");sex = char.Parse(Console.ReadLine());Console.WriteLine();Console.Write(\"请输入年龄;\");age = int.Parse(Console.ReadLine());Console.WriteLine();Console.Write(\"请输入身高;\");height = float.Parse(Console.ReadLine());Console.WriteLine();Console.Write(\"请输入体重;\");weight = double.Parse(Console.ReadLine());Console.WriteLine();Console.WriteLine(\"个人信息如下;\");Console.WriteLine(\"姓名;{0}\\n学号;{1}\\n性别;{2}\\n年龄;{3}\\n身高;{4}\\n体重;{5}\",name,num,sex,age,height,weight);Console.ReadKey();}}}