-
Notifications
You must be signed in to change notification settings - Fork 0
/
task10p.cpp
54 lines (47 loc) · 917 Bytes
/
task10p.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include <iostream>
using namespace std;
void country(string name ,float ticket);
main()
{
while(true)
{
string name;
float ticket;
cout << "enter country name:";
cin >> name;
country(name,ticket);
}
}
void country(string name,float ticket)
{
if(name == "pakistan")
{
cout<<"enter ticket price:";
cin>>ticket;
cout<<"Final Price is..."<<ticket-ticket*5/100<<endl;
}
if(name == "ireland")
{
cout<<"enter ticket price:";
cin>>ticket;
cout<<"Final Price is..."<<ticket-ticket*10/100<<endl;
}
if(name == "india")
{
cout<<"enter ticket price:";
cin>>ticket;
cout<<"Final Price is..."<<ticket-ticket*20/100<<endl;
}
if(name == "England")
{
cout<<"enter ticket price:";
cin>>ticket;
cout<<"Final Price is..."<<ticket-ticket*30/100<<endl;
}
if(name == "Canada")
{
cout<<"enter ticket price:";
cin>>ticket;
cout<<"Final Price is..."<<ticket-ticket*45/100<<endl;
}
}