Vous êtes sur la page 1sur 4

#include<iostream>

#include<conio.h>
usingnamespace std;
int main()
{
int calls, phonebill, option;
double v, s, t, m;
cout <<"Enter calls"<< endl;
cin >> calls;
cout <<"Enter Option"<< endl;
cin >> option;
switch (option)
{
case 1:
if (calls <= 100)
cout <<"Phonebill is Rs.100"<< endl;
break;
case 2:
if (calls <= 150)
v = 200 + (0.6 * 50);
cout <<"Phonebill is Rs. "<< v << endl;
break;
case 3:
if (calls <= 200)
s = 200 + (0.6 * 50) + (0.5 * 50);
cout <<"Phonebill is Rs."<< s << endl;
break;
case 4:
if (calls > 200)
cout <<"Enter extra calls"<< endl;
cin >> m;
t = 200 + (0.6 * 50) + (0.5 * 50) + (0.4*m);
cout <<"Phonebill is Rs."<< t << endl;
break;
default:
cout <<"Wrong information provided"<< endl;
}
_getch();
return 0;
}
#include<iostream>
#include<conio.h>
usingnamespace std;
int main()
{
float code1 = 500, code2;
float code3, code4;
int option, s, v;
cout <<"Input option"<< endl;
cin >> option;
switch (option)
{
case 1:
cout <<"The weekly pay of each of Managers is $"<< code1 << endl;
break;
case 2:
code2 = (1 * 40) + (1.5 * 8);
cout <<"The weekly pay of each of Hourly employes is $"<<code2<< endl;
break;
case 3:
code3 = 250 + 14.25;
cout <<"The wekly pay of each of Comission workers is $"<<code3<< endl;
break;
case 4:
cout <<"Enter amount per itom"<< endl;
cin >> s;
cout <<"Enter itom per week"<< endl;
cin >> v;
code4 = s*v;
cout <<"The weekly pay of each of pieceworkers is $"<< code4 << endl;
break;
default:
cout <<"Incorrect informtion "<< endl;
break;
}
_getch();
return 0;
}

Vous aimerez peut-être aussi