In: Computer Science
how can benefit from C++ to develop a simple system for diagnosing number of people whom affected by Coronavirus during a period of two weeks depending on the temperature and Oxygen rate of each individual person. Note: the temperature on the normal person is (37) and the Oxygen rate is above (90).
#source code:
#include <iostream>
using namespace std;
int main(){
int per;
cout<<"Enter number of persons:";
cin>>per;
int datat[per];
int datao[per];
for(int i=0;i<per;i++){
cout<<"Enter Person "<<i+1<<" Details:"<<endl;
cout<<"Enter temparature:";
cin>>datat[i];
cout<<"Enter oxyen:";
cin>>datao[i];
}
int nrmlcnt=0;
int notnrmlcnt=0;
for(int i=0;i<per;i++){
if(datat[i]==37 && datao[i]>90){
nrmlcnt+=1;
}else{
notnrmlcnt+=1;
}
}
cout<<"Normal Persons Count:"<<nrmlcnt<<endl;
cout<<"Not Normal Persons Count:"<<notnrmlcnt<<endl;
return 0;
}
#output: