Question: it's A C Program and I have done that I want to add file input output you can search Google what it supposed to mean
it's A C Program and I have done that I want to add "file input output" you can search Google what it supposed to mean
I attached my coding here and pls add this "file input output coding" inside this coding of mine thank you
#include //Function declarations float calcAQI (float a[4]); void DisplayMessage(float avg); float sum; //Main function to get values from user int main() { float a[4]; printf("____________________________________________"); printf(" Air Quality Index (AQI) Calculator "); printf("____________________________________________ "); printf("Enter O3 value (8 hours): "); scanf("%f",&a[0]); printf("Enter O3 value (1 hour): "); scanf("%f",&a[1]); printf("Enter PM 2.5 value (8 hours): "); scanf("%f",&a[2]); printf("Enter PM 10 value (8 hours): "); scanf("%f",&a[3]); //Function call to calculate the value of AQI float avg = calcAQI(a); //Function call to print the AQI values DisplayMessage(avg); } //Function definiton of calcAQI to calculate AQI float calcAQI (float a[4]) { for (int i=0;i Can you do file input output for the aqi category and aqi colour
can you restructures the coding using "file input output"
ok you know what
can you do this question coding all over again don't forget use C program must contain all of this in the coding ( C program) a. Comment b. Indentation c. Simple input and output (printf scanf) d. Formatted input output e. Loop f. Array g. File input output h. Function (three categories function, return value function, void function only with passing argument, void function with passing argument and return parameter value). Use them appropriately.
don't forget the g. Thank You
QUESTION 1 Environmental pollution has primarily been traced back to urbanization and industrial developments around the globe. Air pollution has now been identified as one of the significant problems confronting metropolitan regions of any country, where its administrators and residents have long been dealing with potential harm to air pollution, such as the health of their citizens. The occurrences of pollutants have gone up, the concentration of PM2.5, PM10, SO2, NO2, CO, O3 are through the roof. It has been identified as some of the worst air quality standards since 1999 and potentially the worst air quality throughout the world (Om Patra et al 2020). Write a C program that will calculate the AQI and categorize the air quality of a particular area based on Figure 1. AQI AQI Category AQI Color 03 (ppb) (8hr) (1hr) PM2.5, PM10, (ug/m) (ug/m2) 0-50 Good Green 0-64 0 - 15 0-54 65 - 84 16 -40 55 - 154 51-100 Moderate Yellow Unhealthy 101-150 for Sensitive Orange Groups 151-200 Unhealthy Red 85 - 104 | 125 - 164 41 - 65 155 - 254 105 - 124 165-20466 - 150 255 - 354 201-300 Very Unhealthy Purple 125 - 374 205 - 404 151 - 250 355 - 424 301+ Hazardous Maroon 405 - 604251 - 500 425 - 604 Figure 1: Categorization of air quality You need to study and find the equation for calculating the AQI value ( Refer many resources from Internet Eg https://fit.thequint.com/health-news/explaining-air-quality- index). You may create your own data or use internet data. QUESTION 1 Environmental pollution has primarily been traced back to urbanization and industrial developments around the globe. Air pollution has now been identified as one of the significant problems confronting metropolitan regions of any country, where its administrators and residents have long been dealing with potential harm to air pollution, such as the health of their citizens. The occurrences of pollutants have gone up, the concentration of PM2.5, PM10, SO2, NO2, CO, O3 are through the roof. It has been identified as some of the worst air quality standards since 1999 and potentially the worst air quality throughout the world (Om Patra et al 2020). Write a C program that will calculate the AQI and categorize the air quality of a particular area based on Figure 1. AQI AQI AQI Color 03 (ppb) Category (8hr) (1hr) (ug/m) (ug/m) PM2.5, PM10, 0-50 Good Green 0-64 0 - 15 0-54 51-100 Moderate Yellow 65 - 84 16 -40 55 - 154 Unhealthy 101-150 for Sensitive Orange Groups 85 - 104 | 125 - 164 41 - 65 155 - 254 151-200 Unhealthy Red 105 - 124 165 - 20466 - 150 255 - 354 201-300 Very Unhealthy Purple 125 - 374 205 404 151 - 250 355 - 424 301+ Hazardous Maroon |405 - 604 251 - 500 425 - 604 Figure 1: Categorization of air quality You need to study and find the equation for calculating the AQI value ( Refer many resources from Internet Eg https://fit.thequint.com/health-news/explaining-air-quality- index). You may create your own data or use internet data