Question: c++ Write a program to determine if vehicles tested for identical miles meet a carbon monoxide emission standard for g/mi. Your program should first input

c++

c++ Write a program to determine if vehicles tested for identical miles

Write a program to determine if vehicles tested for identical miles meet a carbon monoxide emission standard for g/mi. Your program should first input the standard to be used, the number of vehicles that were tested, and the number of miles in the test. Then it should loop and ask for the emissions level for each vehicle in the test and output a message indicating if it meets the standard. Input 1: prompt for and input this data before the loop (see the sample run below): 1. the amount of allowable carbon monoxide in grams per mile 2. the number of vehicles in the test 3. the number of miles all vehicles were driven Input 2: (prompt for and input this data for each vehicle) (see the sample run below): 1. The total amount of carbon monoxide emitted for the next vehicle in the test (note that the vehicle number is output in the prompt) Output: (see the sample run below): 1. Vehicle emission in g/mi during the test 2. An indication of whether or not the vehicle emissions met the standard 3. Include all pertinent information as shown in the sample - O X C:\Users Vill Desktop\Miami CSE 153\Programs\NewCarEmi... Enter the carbon monoxide emission standard: 3.2 Enter the number of vehicles to be tested: 3 Enter the number of miles the vehicles were driven: 15 Enter total amount of carbon monoxide emitted in grams for vehicle 1: 56 Carbon monoxide emission of 3.73333 g/mi exceeds permitted emission of 5.2 g/mi. Enter total amount of carbon monoxide emitted in grams for vehicle 2: 34 Carbon monoxide emission of 2.26667 g/mi meets permitted emission of 3.2 g/mi. Enter total amount of carbon monoxide emitted in grams for vehicle 3: 23 Carbon monoxide emission of 1.53333 g/mi meets permitted emission of 5.2 g/mi

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!