You are on page 1of 4

P1: WRITE A PROGRAM FOR ENVIRONMENTAL AWARENESS.

#include<iostream>

using namespace std;

#include<stdio.h>

#include<conio.h>

int main ()

{const int CUTOFF1=50,

CUTOFF2=100,

CUTOFF3=150,

CUTOFF4=200,

CUTOFF5=300;

int level1 , level2, level3;

cout<<"Enter three pollution readings(Parts Per Million): " ;

cin>>level1>>level2>>level3;

int index= (level1+level2+level3)/3;

cout<<"AQI: "<<index<<"\n";

if (index<CUTOFF1)

cout<<"Air Quality conditions are :Good\nSymoblised by color: Green\n";

else if (index<CUTOFF2)

cout<<"Air Quality conditions are :Moderate\nSymoblised by color: Yellow\n";

else if (index<CUTOFF3)

cout<<"Air Quality conditions are :Unhealthy for sensitive groups\nSymoblised by


color:Orange\n";

else if (index<CUTOFF4)
cout<<"Air Quality conditions are :Unhealthy\nSymoblised by color: Red\n";

else if (index<CUTOFF5)

cout<<"Air Quality conditions are :Very Unhealthy\nSymoblised by color:Purple\n";

else

cout<<"Air Quality conditions are :Hazardous\nSymoblised by color:Maroon\n";

getch();

OUTPUT:

You might also like