-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram Tiket Pesawat.cpp
More file actions
76 lines (66 loc) · 1.56 KB
/
Program Tiket Pesawat.cpp
File metadata and controls
76 lines (66 loc) · 1.56 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#include <iostream>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
main()
{
char lagi,napes[20];
long int harga=0,tolbay,bayar,kembali,kode,kelas;
float jumtik;
awal:
system("cls");
cout<<"PROGRAM TIKET PESAWAT"<<endl;
cout<<" JAKARTA-MALAYSIA"<<endl;
cout<<"==========================="<<endl;
cout<<"\t1.Merpati Airlines"<<endl;
cout<<"\t2.Garuda Indonesia"<<endl;
cout<<"\t3.Batavia Airlines"<<endl;
cout<<"Kode Pesawat [1/2/3]";
cin>>kode;
cout<<"Kelas Pesawat :"<<endl;
cout<<"\t1.Executive"<<endl;
cout<<"\t2.Bisnis"<<endl;
cout<<"\t3.Ekonomi :"<<endl;
cout<<"Pilih Kelas [1/2/3] : ";
cin>>kelas;
if(kode==1)
{
cout<<"Merpati Airlines";
if(kelas==1)harga=1500000;
else if(kelas==2)harga=900000;
else harga=700000;
}
if(kode=='2')
{
if(kelas=='1')harga=1200000;
else if(kelas=='2')harga=800000;
else harga=400000;}
if(kode=='3')
{
if(kelas=='1')harga=1000000;
else if(kelas=='2')harga=700000;
else harga=300000;}
system("cls");
cout<<"\tPROGRAM TIKET PESAWAT";
cout<<"\t JAKARTA-MALAYSIA";
cout<<"=======================================";
cout<<"Nama Pesawat\t:"<<napes<<endl;
cout<<"Harga Tiket\t:"<<harga<<endl;
cout<<"Jumlah Tiket\t:";
cin>>jumtik;
tolbay=harga*jumtik;
cout<<"Total Bayar\t:"<<tolbay<<endl;
cout<<"Uang Bayar\t:";
cin>>bayar;
kembali=bayar-tolbay;
cout<<"Kembali \t:"<<kembali<<endl;
puts("\t*****TERIMA KASIH*****\n");
cout<<"Ingin Input Lagi? [Y/N]:";
cin>>lagi;
if(lagi=='Y'||lagi=='y')
goto awal;
else
system("cls");
getch ();
}