Write a C++ program that helps a person decide which mode of transportation they should take to get them to their destination on time. It should ask the user for 3 things: how far they are traveling in kilometers, what time of day it is (morning, afternoon, or evening), and how many minutes from now they have to be there. The program should then reply with all of the modes of transportation that will get them there on time (some might be too slow and won't work). If a particular mode does not work, it should not be listed. Here are the speeds of each mode by time of day: morning subway: 30km / hour car: 23km / hour walking: 6km / hour afternoon subway: 62km / hour car: 60km / hour walking: 6km / hour evening subway: 32km / hour car: 44km / hour walking: 6km / hour
Write a C++ program that helps a person decide which mode of transportation they should take to get them to their destination on time. It should ask the user for 3 things: how far they are traveling in kilometers, what time of day it is (morning, afternoon, or evening), and how many minutes from now they have to be there. The program should then reply with all of the modes of transportation that will get them there on time (some might be too slow and won't work). If a particular mode does not work, it should not be listed. Here are the speeds of each mode by time of day:
morning
subway: 30km / hour
car: 23km / hour
walking: 6km / hour
afternoon
subway: 62km / hour
car: 60km / hour
walking: 6km / hour
evening
subway: 32km / hour
car: 44km / hour
walking: 6km / hour
Step by step
Solved in 4 steps with 2 images