Question
Create an IPO chart, flowchart, pseudocode algorithm and desk check for a program that converts speeds between miles per hour (mph) and kilometers per hour
Create an IPO chart, flowchart, pseudocode algorithm and desk check for a program that converts speeds between miles per hour (mph) and kilometers per hour (kph). The program should first prompt the user to select either 1 to convert mph to kph or 2 to convert kph to mph, then request the speed to convert and calculate and display the result. An error should be displayed if a choice other than 1 or 2 is entered. Example 1: Select 1 to convert mph to kph or 2 to convert kph to mph: 1 Enter speed in mph: 50 Converted speed in kph: 80 Example 2: Select 1 to convert mph to kph or 2 to convert kph to mph: 2 Enter speed in kph: 100 Converted speed in mph: 62.5 Example 3: Select 1 to convert mph to kph or 2 to convert kph to mph: 5 Error: Invalid option. You are expected to use an appropriate selection control structure of your choosing to solve this problem. For reference, you may consider 1 mph to be equivalent to 1.6 kph.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started