Question: static void Main ( string [ ] args ) { string comparison; WriteLine ( Enter a number: ) ; double var 1 = ToDouble

static void Main(string[] args)
{
string comparison;
WriteLine("Enter a number:");
double var1= ToDouble(ReadLine());
WriteLine("Enter another number:");
double var2= ToDouble(ReadLine());
if (var1< var2)
comparison = "less than";
else
{
if (var1== var2)
comparison = "equal to";
else
comparison = "greater than";
}
WriteLine($"The first number is {comparison}"+
$"the second number.");
ReadKey();
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!