Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Problem Statement: Display the menu shown below and print a message based on the

ID: 3599129 • Letter: P

Question

Problem Statement: Display the menu shown below and print a message based on the user's choice You may assume the user enters an integer, but you may not assume it is a valid choice. A valid choice is one which should be between 1 and 7, inclusive. Since we have not yet discussed loops, if the user enters a bad number, simply state that fact and end the program. If the choice entered is 1, display the message, "Your start time is 7:20". If the choice is 2, display the message, "Your start time is 7:18". If the choice is 3 or 4, display the message, "Your start time is 7:15". If the choice is 5 or 6, display the message, "Your start time is 7:10". If the choice is 7, display the message, "Your start time is 7:05" XYZ Marathon Start Times 1) 12+ minute mile 2) 11 minute mile 3) 10 minute mile 4) 9 minute mile 5) 8 minute mile 6) 7 minute mile 6 or below minute mile 7) Please enter a choice based on your running pace:

Explanation / Answer

pseudocode for your above program : -------------------------------->>>>>>>>>>>>>>>>>>>>>>>>>>

define function statement

define choice int variable

print "XYZ Marathon Start Times"

print " 1) 12+ minute mile"

print " 2) 11 minute mile"

print " 3) 10 minute mile"

print " 4) 9 minute mile"

print " 5) 8 minute mile"

print " 6) 7 minute mile"

print " 7) 6 or below minute mile"

print " please enter your choice based on your running pace ."

choice <- entered data

switch for choice

case 1 : print "your start time is 07:20";break;

case 2: print "your start time is 07:18"break;

case 3:

case 4: print "your start time is 07:15";break;

case 5:

case 6: print "your start time is 07:10";break;

case 7: print "your start time is 07:05";break;

default :

end switch

end function

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote