Question: Consider the following C# program? using System; public static class Multi AlternativeIfStatement public static void Main() { int vall, val 2: vall = Convert.ToInt32(Console.ReadLine(); val2

 Consider the following C# program? using System; public static class Multi

Consider the following C# program? using System; public static class Multi AlternativeIfStatement public static void Main() { int vall, val 2: vall = Convert.ToInt32(Console.ReadLine(); val2 = Convert.ToInt32(Console.ReadLine(); if ((vall 2) > val2) Console.WriteLine("Loc 1"); else if ((vall> -2) && (val2=0)) Console.WriteLine("Loc 2"); else if (vall -val2) Console.WriteLine("Loc 3"); else Console.WriteLine("Loc 4"); Console.ReadLine(); What is the output of this program assuming the following five (5) sets of input (i.e. when the program is run, assume the following numbers are entered by the user). Be sure that you provide answers to all five sets of input (and label each answer with the corresponding letter... e.g. (a) Loc 3, (b) Loc 2, etc.)

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!