Examine the code and indicate what text would be displayed on the screen during
ID: 3767409 • Letter: E
Question
Examine the code and indicate what text would be displayed on the screen during the Console.WriteLine statement.
int iNumber = 7; string sNumberName = "";
switch (++iNumber) {
case 1: sNumberName = "One"; break;
case 2: sNumberName = "Two"; break;
case 3: sNumberName = "Three";break;
case 4: sNumberName = "Four"; break;
case 5: sNumberName = "Five"; break;
case 6: sNumberName = "Six"; break;
case 7: sNumberName = "Seven"; break;
case 8: sNumberName = "Eight"; break;
case 9: sNumberName = "Nine"; break;
default: sNumberName = "Greater than 9"; break;
} Console.WriteLine(sNumberName);
Explanation / Answer
Eight
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.