The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 305 Weeks Ago, 1 Day Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
this is cosc 1436 programing
can you build the code for me?
Your goal is to ask the user for the speed of a vehicle (in miles per hour) and how many hours it has traveled. The program should then use a loop to display the distance the vehicle has traveled for each hour of that time period. Your program should have the following: ï‚· The name of the program should be Assignment5. ï‚· 3 comment lines (description of the program, author, and date). ï‚· Ask the user for the speed of a vehicle (in miles per hour). Store this result in a variable with an appropriate name. Do not accept a negative number for the speed. Use a loop to stop this from happening. (3 points) ï‚· Ask the user for the number of hours that the vehicle has traveled. Store this result in a variable with an appropriate name. Do not accept a value less than 1 for the time traveled. Use a loop to stop this from happening. (3 points) ï‚· Use a loop to display the distance the vehicle has traveled for each hour of that time period (based on the speed and hours that the vehicle has been traveling). (4 points) Example: What is the speed of the vehicle in mph? 40 How many hours has it traveled? 3 Hour Distance Traveled __________________________________ 1 40 2 80 3 120
----------- Â ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly