Sie sind auf Seite 1von 4

Course: Introduction to Computing

Submitted By: Tahira Kalsoom

Submitted To: Dr. Ateeq Ur Rehman

Reg. No: F-19/BSBM/044


#include <iostream>
#include <iomanip>

using namespace std;

int main()
{

string med1="Levaquin";
string med2="Ibuprofen";
string med3="Amlodipine";
string med5="Danazol";
string med6="Lanoxin"
string n_g="Dr. Tahira has diagnosed you with UTI";
string n_e="Dr. Amreen has diagnosed you with an ear infection";
string n_c="Dr. Haashir has diagnosed you with High Blood Pressure";
string a_e="Dr. Amreen has diagnosed you with Swimmer's ear";
string a_g="Dr. Tahira has diagnosed you with Endometriosis";
string a_c="Dr. Haashir has diagnosed you with Tachycardia";

int price1=800;
int price2=350;
int price3=650;
int price5=700;
int price6=770;
string p_name;
int p_id;
int x;

cout<<setw(65)<<"***********WELCOME TO CMH************"<<endl;
int numb;
cout<<"Enter number of Patients: ";
cin>>numb;
int t;
for (t=1;t<=numb;t++)
{
proc:
cout<<"Patient name: ";
cin>>p_name;
cout<<"Patient ID: ";
cin>>p_id;
cout<<endl;

if((p_name=="Nadia") && (p_id==2309))


{
cout<<"Hello Nadia"<<endl<<"Please Select a Department: "<<endl;
}
else if((p_name=="Aleena") && (p_id==1212))
{
cout<<"Hello Aleena"<<endl<<"Please Select a Department: "<<endl;
}
else
{
cout<<"Invalid, please try again."<<endl;
goto proc;
}
back:
cout<<"1. ENT"<<endl<<"2. GYNECOLOGY"<<endl<<"3. CARDIOLOGY"<<endl;
cin>>x;

if((x==1) && (p_id==2309))


{
cout<<"ENT Department - Dr. Amreen"<<endl;
cout<<n_e<<endl;
cout<<"You have been prescribed: "<<med2<<endl;
cout<<"Your bill is: "<<"RS "<<price2<<endl;
}
else if((x==2) && (p_id==2309))
{
cout<<"GYNECOLOGY Department - Dr. Tahira"<<endl;
cout<<n_g<<endl;
cout<<"You have been prescribed: "<<med1<<endl;
cout<<"Your bill is: "<<"RS "<<price1<<endl;
}
else if((x==3) && (p_id==2309))
{
cout<<"CARDIOLOGY Department - Dr. Haashir"<<endl;
cout<<n_c<<endl;
cout<<"You have been prescribed: "<<med3<<endl;
cout<<"Your bill is: "<<"RS "<<price3<<endl;
}
else if ((x==1) && (p_id==1212))
{
cout<<"ENT Department - Dr. Amreen"<<endl;
cout<<a_e<<endl;
cout<<"You have been prescribed: "<<med2<<endl;
cout<<"Your bill is: "<<"RS "<<price2<<endl;
}
else if ((x==2) && (p_id==1212))
{
cout<<"GYNECOLOGY Department - Dr. Tahira"<<endl;
cout<<a_g<<endl;
cout<<"You have been prescribed: "<<med5<<endl;
cout<<"Your bill is: "<<"RS "<<price5<<endl;
}
else if ((x==3) && (p_id==1212))
{
cout<<"CARDIOLOGY Department - Dr. Haashir"<<endl;
cout<<a_c<<endl;
cout<<"You have been prescribed: "<<med6<<endl;
cout<<"Your bill is: "<<"RS "<<price6<<endl;
}
else
{
cout<<"Invalid, please try again."<<endl;
goto back;
}

cout<<"******************************"<<endl;
cout<<"Take care of yourself!"<<endl;

return 0;
}

Das könnte Ihnen auch gefallen