You, as a programmer are required to develop a C++ program that checks the status of Air Pollution Index (API) based on the table below:
API Air Quality Status
0 – 50 Good
51 – 100 Average
101 – 200 Not healthy
201 – 300 Very unhealthy
301 – 500 Danger
over 500 Declare critical condition
If the user input API value less than zero, display a message “API not valid“. You must use a loop so that the program will be looping until the user chooses not to continue. Your program should have a function named IPU_CATEGORY that will check the API category by using if-else statement and then display the result of the air quality status.
Comments
Leave a comment