Question: 1 Write a program to determine if vehicles tested for identical miles meet a carbon monoxide emission standard for g / mi . Your program

1
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

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!