What will be displayed from executing the following segment of code? You may assume testScore has a
Question:
What will be displayed from executing the following segment of code? You may assume testScore has a value of 90.
int testScore;
if (testScore < 60); // Note the semicolon.
Console.WriteLine("You failed the test!");
if (testScore > 60)
Console.WriteLine("You passed the test!");
else Console.WriteLine("You need to study for "
+ "the next test!");
a. You failed the test!
b. You passed the test!
c. You failed the test!
You passed the test!
d. You failed the test!
You need to study for the next test!
e. none of the above
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
C# Programming From Problem Analysis To Program Design
ISBN: 9781285096261
4th Edition
Authors: Barbara Doyle
Question Posted: