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

Computer Science & Information Technology

You might also like to view...

What happens to the background when you print a slide show in Grayscale?

A) An error message occurs. B) The background prints in shades of gray. C) The background will only print in black and white, no shades will be included. D) The background will not print.

Computer Science & Information Technology

Health Metrics measure member activity and engagement in the community. What are they?

What will be an ideal response?

Computer Science & Information Technology