Download Introduction to Computer Concepts - Programming Lab 7 | CSCE 101 and more Lab Reports Computer Science in PDF only on Docsity! Programming Lab 7 Spring Break is approaching fast. You have decided to drive to West Palm Beach to spend the week with your friends. As a part of your planning, you need to determine how long it will take you to get there and how much you will need to spend on gas. The distance between Columbia and West Palm Beach is approximately 575 miles and the current price of gas is $2.89 per gallon. Declare four floating point variable called Cost, Time, Speed, and MPG float Cost, Time, Speed, MPG; Write an input statement for Speed and then (at the prompt) enter the value representing the average speed at which you drive on interstate highways cin >> Speed; Write an input statement for MPG and then (at the prompt) enter the value representing the average highway gas mileage for your car Calculate the total amount of time required for your trip Time = 575/Speed; Calculate the cost of gas for your trip Cost = (575/MPG)*2.89; Output the total trip time and gas cost values cout << “Your trip will take: ” << Time << “ hrs” << endl; cout << “The total cost of gas for your trip is: $” << Cost << endl; Using the program mode Open Notepad The first line must be a comment statement. Include your name in the comment. Look at the tutorial for this. Go to the file menu and select “save as.” In the top dropdown box select your H drive. Save your file directly onto the H drive, do not put it inside any folders. Choose “all files” in the type dropdown menu (just like we did to save html files.) Finally, give your file a .ch extension (just like we gave our html files a .html extension.) Click save. Remember to save your file often. Type the include statement that is needed to facilitate input/output capabilities. Look at the tutorial for this. The beginning of your code starts with the following statement: main ( ) { Enter your code after the opening curly bracket. Your code should contain the statements to do the following. Remember to close each line of code below with a semicolon. o Declare four floating point variable called Cost, Time, Speed, and MPG. o Output a short phrase asking for the user’s average driving speed on interstate highways.