您的当前位置:首页C#代码之数组与输入几个数字后的大小排序

C#代码之数组与输入几个数字后的大小排序

2024-01-23 来源:乌哈旅游


static void Main(string[] args) {

string comparison;

Console.WriteLine(\"Enter a number:\");

double var1 = Convert.ToDouble(Console.ReadLine()); Console.WriteLine(\"Enter another number:\");

double var2 = Convert.ToDouble(Console.ReadLine()); if (var1 < var2)

} } }

comparison = \"less than\"; else {

if (var1 == var2)

comparison = \"equal to\"; else

comparison = \"greater than\"; }

Console.WriteLine(\"The first number is {0} the second number.\ comparison); Console.ReadKey();

因篇幅问题不能全部显示,请点此查看更多更全内容