Question: 2. Now, create a new project and name its main class (and file) as SwitchStatement. Implement anothe version of the above program by writing the

2. Now, create a new project and name its main class (and file) as SwitchStatement. Implement anothe version of the above program by writing the following code. Console.WriteLine("Enter a number (as an integer): "); int number = Convert.ToInt32 (Console.ReadLine()); switch (number) { } case 1: Console.WriteLine("One"); break; break; case 2: Console.WriteLine("Two"); default: Console.WriteLine("Error: you must enter an integer between 1 and 9"); break; Console.ReadLine()

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!