The pseudocode for the following problem is ____.Suppose all students in grade 12 at a high school are to be selected for a field trip, but the boys are leaving on the 8:30 a.m. bus and the girls are leaving at 9:00 a.m.
A. If gradeLevel == 12 Then
Display "Enter M for male, or F for female: "
If gender == "M" Then
Display "Your bus leaves at 8:30 a.m."
Else If
Display "Your bus leaves at 9:00 a.m."
End If
End If
B. If gradeLevel == 12;
Display "Enter M for male, or F for female: "
If gender == "M" Then;
Display "Your bus leaves at 8:30 a.m."
Else;
Display "Your bus leaves at 9:00 a.m."
End If;
End If
C. If gradeLevel == 12 Then
Display "Enter M for male, or F for female: "
Input gender
If gender == "M" Then
Display "Your bus leaves at 8:30 a.m."
Else
Display "Your bus leaves at 9:00 a.m."
End If
End If
D. If gradeLevel >= 12 Then
Display "Enter M for male, or F for female: "
If gender == "M"
Display "Your bus leaves at 8:30 a.m."
Else
Display "Your bus leaves at 9:00 a.m."
End
End If
Answer: C
You might also like to view...
The array subscript operator [], when overloaded, cannot:
a. Be used with linked list classes. b. Take a float as an operand. c. Take multiple values inside (e.g., [4,8]). d. Take user-defined objects as operands.
Which of the following is NOT a hacker category?
A. Hacktivist B. Black Hats C. Green Hats D. White Hats
Ethical egoism is
a. not based on reason or logic. b. based on determining long-term beneficial consequences. c. the divine command theory by another name. d. Kantianism by another name. e. utilitarianism by another name.
How can you produce the following results in one line of code?
Visual C# How to Program, Sixth Edition Welcome to C# Programming! a) Console.Write("Welcome \n to \n C# \n Programming!\n"); b) Console.WriteLine("Welcome \n to \n C# \n Programming!"); c) Console.Write("Welcome \n to \n C# Programming!"); d) a and b