News
Loading...

Membuat Program Transportasi Udara di Bahasa Pemrograman C++ dan C

Sarjanabersama-Baiklah, pada artikel kali ini akan membahas cara Membuat Program Transportasi Udara di Bahasa Pemrograman C++. Bahasa pemrograman C++ adalah bahasa pemrograman tingkat menengah. C adalah bahasa memprograman terstruktur yang membagi program kedalam sejumlah blok ( sub program ). Tujuannya adalah untuk memudah kan dalam pembuatan dan pengembangan program.

Membuat Program Transportasi Udara di Bahasa Pemrograman C++ dan C

Uraian/Ringkasan

Didalam hasil program adalah membuat sebuah aplikasi pembelian tiket pesawat dan didalam aplikasi pemrograman ini menggunakan materi tentang logika, looping, pernyataan, operator dan beberapa prosesor lainnya seperti :
#include conio.h untuk menjalankan clrscr (), untuk menjalankan gotoxy(), 
#include iostream.h untuk menjalankan cin dan cout(), 
#include stdio.h untuk menjalankan gets(), sedangkan 
#include time.h berfungsi untuk menjalankan tulisan berjalan. 
Didalam program ini menggunakan switch yang berguna untuk pemilihan seperti ada dua pilihan maka harus masukkan salah satu pemilihan tersebut.
Diddalam program pembelian tiket pesawat ini kita akan dapat memilih rute penerbangan, maskapai penerbangan, class penerbangan, jadwal penerbangan,dan juga bias membeli beberapa tiket yang ingin kita beli, dan untuk lebih jelasnya lagi lihat program pada halaman selanjutnya yang udah penulis selesaikan guna memenuhi tugas yang sudah dosen berikan.

Program

Yuk langsung saja ke syntak programnya.
// Diharapkan bisa memahami setiap perintah dibawah ini 

Program ini dibuat Oleh Teguh Afalah, follow akun instagramnya di @teguhalfallah

1. Syntak Program

#include <iostream.h    //sarjanabersama.com
#include <stdio.h>
#include <conio.h>
#include <string.h>  //jika memakai strcpy
#include <time.h>    //jika memakai tulisan berjalan


void delay(unsigned int mseconds)
{                                    //variable tulisan berjalan
clock_t goal=mseconds+clock();
while(goal>clock());
}

void main()

{
int angka;
char mad;

mad='y';
//variable untuk jika masih ada data atau tidak
while(mad=='y'||mad=='Y')

{
cout<<"------------------------------------------------------------------------------"<<endl;
cout<<"                                                                              |"<<endl;
cout<<"------------------------------------------------------------------------------"<<endl;

int m;
for(m=1;m<9;m++)                                                                       //for untuk tulisan berjalan
{                                                                                     //menampilkan tilisan berjalan
delay(100);

gotoxy(m,2);cout<<" *****Selamat Datang Di Sistem Layanan Transportasi Udara*****";
gotoxy(1,2);cout<<"|";
}
gotoxy(5,4);cout<<"Layanan Yang Ada :"<<endl;
gotoxy(5,5);cout<<"1. Layanan Pembelian Tiket"<<endl;                //untuk pilihan layanan
gotoxy(5,6);cout<<"2. Layanan Penumpang"<<endl;
gotoxy(5,8);cout<<"Silahkan Pilih Kode [1/2]: ";cin>>angka;
clrscr();
switch(angka)
{
 {
case 1:

gotoxy(5,2);
cout<<"---------------------------------------------------\n";

gotoxy(5,3);cout<<"|";
gotoxy(18,3);cout<<"Layanan Pembelian Tiket";
gotoxy(55,3);cout<<"|\n";

gotoxy(5,4);                                                          //case 1(Layanan Pembelian Tiket)
cout<<"---------------------------------------------------\n";       //array tabel
gotoxy(5,5);cout<<"| No";
gotoxy(12,5);cout<<"| Model Pembelian";
gotoxy(30,5);cout<<"| Jenis Layanan";
gotoxy(55,5);cout<<"|\n";
gotoxy(5,6);
cout<<"---------------------------------------------------\n";

gotoxy(5,7);cout<<"| 1";
gotoxy(12,7);cout<<"| Tiket Online";
gotoxy(30,7);cout<<"| Traveloka";
gotoxy(55,7);cout<<"|\n";

gotoxy(5,8);cout<<"| ";
gotoxy(12,8);cout<<"| ";
gotoxy(30,8);cout<<"| Elevenia";
gotoxy(55,8);cout<<"|\n";

gotoxy(5,9);cout<<"| ";
gotoxy(12,9);cout<<"| ";
gotoxy(30,9);cout<<"| Agoda";
gotoxy(55,9);cout<<"|\n";

gotoxy(5,10);
cout<<"---------------------------------------------------\n";

gotoxy(5,11);cout<<"| 2";
gotoxy(12,11);cout<<"| Melalui Agen";
gotoxy(30,11);cout<<"| Totalnusa";
gotoxy(55,11);cout<<"|\n";

gotoxy(5,12);cout<<"| ";
gotoxy(12,12);cout<<"| ";
gotoxy(30,12);cout<<"| Fastravel";
gotoxy(55,12);cout<<"|\n";

gotoxy(5,13);cout<<"| ";
gotoxy(12,13);cout<<"| ";
gotoxy(30,13);cout<<"| Trafgo";
gotoxy(55,13);cout<<"|\n";

gotoxy(5,14);
cout<<"---------------------------------------------------\n";

gotoxy(5,15);cout<<"| 3";
gotoxy(12,15);cout<<"| Loket";
gotoxy(30,15);cout<<"| ";
gotoxy(55,15);cout<<"|\n";

gotoxy(5,16);
cout<<"---------------------------------------------------\n";

break;
}
case 2:
{
char id[15],np[15],mk[15],c[15],rt[15],jp[15],kp[15];       //variable untuk case 2
int k,cp,mp,jb;
long jt,tb,h;


 gotoxy(10,1);cout<<"Daftar Layanan Pengunjung:"<<endl;           //case 2(layanan pengunjung)
 gotoxy(10,2);cout<<"--------------------------"<<endl;
//23456789012345678901234567890123456789012345
 gotoxy(2,4);cout<<"--------------------------------------------"<<endl;
 gotoxy(2,5);cout<<"| No | Kode Penerbangan | Rute Penerbangan |"<<endl;
 gotoxy(2,6);cout<<"--------------------------------------------"<<endl;

 char kop[4][20]={"a","PKU-JKT","PKU-PDG","PKU-LBK",} ;
 char rut[4][30]={"b","Pekanbaru-Jakarta","Pekanbaru-Padang","Pekanbaru-Lombok"};
 int a;

 for(a=1;a<=3;a++)                                          //array tabel
 {
gotoxy(2,6+a);cout<<"|";
gotoxy(4,6+a);cout<<a;
gotoxy(7,6+a);cout<<"|";
gotoxy(13,6+a);cout<<kop[a];
gotoxy(26,6+a);cout<<"|";
gotoxy(28,6+a);cout<<rut[a];
gotoxy(45,6+a);cout<<"|";
 }

 gotoxy(2,10);cout<<"--------------------------------------------"<<endl;
 gotoxy(5,14);cout<<"Pilih Rute Penerbangan [1/2/3] :";cin>>k;
 clrscr();

 if(k==1)
 {
 strcpy(kp,"PKU-JKT");
 strcpy(rt,"Pekanbaru-Jakarta");
 gotoxy(5,3);cout<<"Rute Penerbangan  :"<<rt<<endl;

 gotoxy(1,5);cout<<"Daftar Maskapai Penerbangan :"<<endl;
 gotoxy(1,6);cout<<"-----------------------------"<<endl;

 cout<<"----------------------------------------------------"<<endl;     //daftar maskapai penerbangan pekanbaru-jakarta
 cout<<"| No | Maskapai | Class Penerbangan |    Harga     |"<<endl;
 cout<<"----------------------------------------------------"<<endl;
 cout<<"| 1  | Lion Air |   Exclusive       | Rp. 1000000  |"<<endl;
 cout<<"|    |          |   Ekonomi         | Rp. 850000   |"<<endl;
 cout<<"|    |          |   Bisnis          | Rp. 750000   |"<<endl;
 cout<<"----------------------------------------------------"<<endl;
 cout<<"| 2  | Garuda   |   Exclusive       | Rp. 1100000  |"<<endl;
 cout<<"|    |          |   Ekonomi         | Rp. 950000   |"<<endl;
 cout<<"|    |          |   Bisnis          | Rp. 850000   |"<<endl;
 cout<<"----------------------------------------------------"<<endl;
 cout<<"| 3  | Citilink |   Exclusive       | Rp. 950000   |"<<endl;
 cout<<"|    |          |   Ekonomi         | Rp. 800000   |"<<endl;
 cout<<"|    |          |   Bisnis          | Rp. 600000   |"<<endl;
 cout<<"----------------------------------------------------"<<endl;
 cout<<"Pilih Maskapai Penerbangan [1/2/3] :";cin>>mp;

  if(mp==1)
  {
  strcpy(mk,"Lion Air");
  cout<<"Maskapai Penerbangan :"<<mk<<endl;
  cout<<endl<<endl;
  cout<<"Pilih Class Penerbangan [1/2/3] :";cin>>cp;
clrscr();


if(cp==1)
{
strcpy(c,"Exclusive");                                                //menggunakan if bersarang
h=1000000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;

cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}
else if(cp==2)
{
strcpy(c,"Ekonomi");
h=850000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;
cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}
else if(cp==3)
{
strcpy(c,"Bisnis");
h=750000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;

cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}
else
{
cout<<"Kode Yang Dimasukkan Salah"<<endl;
break;
}
  }
  else if(mp==2)
  {
  strcpy(mk,"Garuda");
  cout<<"Maskapai Penerbangan :"<<mk<<endl;
  cout<<endl<<endl;
  cout<<"Pilih Class Penerbangan [1/2/3] :";cin>>cp;
clrscr();


if(cp==1)
{
strcpy(c,"Exclusive");
h=1100000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;

cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}
else if(cp==2)
{
strcpy(c,"Ekonomi");
h=950000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;
cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}
else if(cp==3)
{
strcpy(c,"Bisnis");
h=850000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;

cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}
else
{
cout<<"Kode Yang Dimasukkan Salah"<<endl;
break;
}
  }
  else if(mp==3)
  {
  strcpy(mk,"Citilink");
  cout<<"Maskapai Penerbangan :"<<mk<<endl;
  cout<<endl<<endl;
  cout<<"Pilih Class Penerbangan [1/2/3] :";cin>>cp;
clrscr();


if(cp==1)
{
strcpy(c,"Exclusive");
h=950000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;

cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}
else if(cp==2)
{
strcpy(c,"Ekonomi");
h=800000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;
cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}
else if(cp==3)
{
strcpy(c,"Bisnis");
h=600000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;

cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}

else
{
cout<<"Kode Yang Dimasukkan Salah"<<endl;
break;
}
}


  else
  {
  cout<<"Kode Yang Diinputkan Salah"<<endl;
  break;
  }
 }

 else if(k==2)
 {
 strcpy(kp,"PKU-PDG");
 strcpy(rt,"Pekanbaru-Padang");
 gotoxy(5,3);cout<<"Rute Penerbangan  :"<<rt<<endl;

 gotoxy(1,5);cout<<"Daftar Maskapai Penerbangan :"<<endl;
 gotoxy(1,6);cout<<"-----------------------------"<<endl;
//daftar maskapai penerbangan pekanbaru-padang
 cout<<"--------------------------------------------------"<<endl;
 cout<<"| No | Maskapai | Class Penerbangan |     Harga  |"<<endl;
 cout<<"--------------------------------------------------"<<endl;
 cout<<"| 1  | Lion Air |   Exclusive       | Rp. 800000 |"<<endl;
 cout<<"|    |          |   Ekonomi         | Rp. 650000 |"<<endl;
 cout<<"|    |          |   Bisnis          | Rp. 600000 |"<<endl;
 cout<<"|------------------------------------------------|"<<endl;
 cout<<"| 2  | Garuda   |   Exclusive       | Rp. 850000 |"<<endl;
 cout<<"|    |          |   Ekonomi         | Rp. 700000 |"<<endl;
 cout<<"|    |          |   Bisnis          | Rp. 650000 |"<<endl;
 cout<<"|------------------------------------------------|"<<endl;
 cout<<"| 3  | Citilink |   Exclusive       | Rp. 750000 |"<<endl;
 cout<<"|    |          |   Ekonomi         | Rp. 550000 |"<<endl;
 cout<<"|    |          |   Bisnis          | Rp. 500000 |"<<endl;
 cout<<"--------------------------------------------------"<<endl;
 cout<<"Pilih Maskapai Penerbangan [1/2/3] :";cin>>mp;

if(mp==1)
{
strcpy(mk,"Lion Air");
cout<<"Maskapai Penerbangan :"<<mk<<endl;
cout<<endl<<endl;
cout<<"Pilih Class Penerbangan [1/2/3] :";cin>>cp;
  clrscr();


if(cp==1)
{
strcpy(c,"EXclusive");
h=800000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;

cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}
else if(cp==2)
{
strcpy(c,"Ekonomi");
h=650000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;
cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}
else if(cp==3)
{
strcpy(c,"Bisnis");
h=600000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;

cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}
else
{
cout<<"Kode Yang Dimasukkan Salah"<<endl;
break;
}

}
else if(mp==2)
{
strcpy(mk,"Garuda");
cout<<"Maskapai Penerbangan :"<<mk<<endl;
cout<<endl<<endl;
cout<<"Pilih Class Penerbangan [1/2/3] :";cin>>cp;
  clrscr();


if(cp==1)
{
strcpy(c,"Exclusive");
h=850000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;

cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}
else if(cp==2)
{
strcpy(c,"Ekonomi");
h=700000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;

cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}
else if(cp==3)
{
strcpy(c,"Bisnis");
h=650000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;

cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}
else
{
cout<<"Kode Yang Dimasukkan Salah"<<endl;
break;
}
}
else if(mp==3)
{
strcpy(mk,"Citilink");
cout<<"Maskapai Penerbangan :"<<mk<<endl;
cout<<endl<<endl;
cout<<"Pilih Class Penerbangan [1/2/3]:";cin>>cp;
  clrscr();


if(cp==1)
{
strcpy(c,"Exclusive");
h=750000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;

cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}
else if(cp==2)
{
strcpy(c,"Ekonomi");
h=550000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;

cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}
else if(cp==3)
{
strcpy(c,"Bisnis");
h=500000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;

cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}
else
{
cout<<"Kode Yang Dimasukkan Salah"<<endl;
break;
}

}
else
{
cout<<"Kode Yang Diinputkan Salah"<<endl;
break;
}
 }

else if(k==3)
 {
 strcpy(kp,"PKU-LBK");
 strcpy(rt,"Pekanbaru-Lombok");
 gotoxy(5,3);cout<<"Rute Penerbangan  :"<<rt<<endl;

 gotoxy(1,5);cout<<"Daftar Maskapai Penerbangan :"<<endl;
 gotoxy(1,6);cout<<"-----------------------------"<<endl;                      //daftar maskapai penerbangan pekanbaru-lombok

 cout<<"----------------------------------------------------"<<endl;
 cout<<"| No | Maskapai | Class Penerbangan |     Harga    |"<<endl;
 cout<<"----------------------------------------------------"<<endl;
 cout<<"| 1  | Lion Air |   Exclusive       | Rp. 1100000  |"<<endl;
 cout<<"|    |          |   Ekonomi         | Rp. 1000000  |"<<endl;
 cout<<"|    |          |   Bisnis          | Rp. 950000   |"<<endl;
 cout<<"|--------------------------------------------------|"<<endl;
 cout<<"| 2  | Garuda   |   Exclusive       | Rp. 1200000  |"<<endl;
 cout<<"|    |          |   Ekonomi         | Rp. 1150000  |"<<endl;
 cout<<"|    |          |   Bisnis          | Rp. 1050000  |"<<endl;
 cout<<"|--------------------------------------------------|"<<endl;
 cout<<"| 3  | Citilink |   Exclusive       | Rp. 1000000  |"<<endl;
 cout<<"|    |          |   Ekonomi         | Rp. 900000   |"<<endl;
 cout<<"|    |          |   Bisnis          | Rp. 800000   |"<<endl;
 cout<<"----------------------------------------------------"<<endl;

 cout<<"Pilih Maskapai Penerbangan [1/2/3] :";cin>>mp;

if(mp==1)
{
strcpy(mk,"Lion Air");
cout<<"Maskapai Penerbangan :"<<mk<<endl;
cout<<endl<<endl;
cout<<"Pilih Class Penerbangan [1/2/3] :";cin>>cp;
  clrscr();


if(cp==1)
{
strcpy(c,"exclusive");
h=1100000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;

cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}
else if(cp==2)
{
strcpy(c,"Ekonomi");
h=1000000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;

cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}
else if(cp==3)
{
strcpy(c,"Bisnis");
h=950000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;

cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}
else
{
cout<<"Kode Yang Dimasukkan Salah"<<endl;
break;
}
}
else if(mp==2)
{
strcpy(mk,"Garuda");
cout<<"Maskapai Penerbangan :"<<mk<<endl;
cout<<endl<<endl;
cout<<"Pilih Class Penerbangan [1/2/3] :";cin>>cp;
  clrscr();


if(cp==1)
{
strcpy(c,"Exclusive");
h=1200000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;

cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}
else if(cp==2)
{
strcpy(c,"Ekonomi");
h=1150000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;

cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}
else if(cp==3)
{
strcpy(c,"Bisnis");
h=1050000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;

cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}
else
{
cout<<"Kode Yang Dimasukkan Salah"<<endl;
break;
}

}
else if(mp==3)
{
strcpy(mk,"Citilink");
cout<<"Maskapai Penerbangan  :"<<mk<<endl;
cout<<endl<<endl;
cout<<"Pilih Class Penerbangan [1/2/3] :";cin>>cp;
  clrscr();


if(cp==1)
{
strcpy(c,"Exclusive");
h=1000000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;

cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}
else if(cp==2)
{
strcpy(c,"Ekonomi");
h=900000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;

cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}
else if(cp==3)
{
strcpy(c,"Bisnis");
h=800000;
gotoxy(2,1);cout<<" Class Penerbangan :"<<c<<endl;

gotoxy(2,3);cout<<"Daftar Jadwal Penerbangan :"<<endl;
gotoxy(2,4);cout<<"---------------------------"<<endl;

  //234567890123456789012345678
gotoxy(2,6);cout<<"---------------------------"<<endl;
gotoxy(2,7);cout<<"| No | Jadwal Penerbangan |"<<endl;
gotoxy(2,8);cout<<"---------------------------"<<endl;        //pemilihan jadwal
  //array tabel
char jad[4][20]={"a","10:15 WIB","13:45 WIB","17:15 WIB"};
int a;
for(a=1;a<=3;a++)
{
gotoxy(2,8+a);cout<<"|";
gotoxy(4,8+a);cout<<a;
gotoxy(7,8+a);cout<<"|";
gotoxy(9,8+a);cout<<jad[a];
gotoxy(28,8+a);cout<<"|";
}

gotoxy(2,12);cout<<"---------------------------"<<endl;

cout<<"Pilih Jadwal Penerbangan [1/2/3] :";cin>>jb;
if(jb==1)
{
strcpy(jp,"10:15 WIB");
}
else if(jb==2)
{
strcpy(jp,"13:45 WIB");
}
else if(jb==3)
{
strcpy(jp,"17:15 WIB");
}
else {
cout<<"Kode Salah"<<endl;
break;
}
}
else
{
cout<<"Kode Yang Dimasukkan Salah"<<endl;
break;
}
}
else
{
cout<<"Kode Yang Diinputkan Salah"<<endl;
break;
}
}
//jika kode yang di inputkan salah

else
 {
 cout<<"Kode Yang Diinputkan Salah"<<endl;
 break;
 }

 clrscr();
gotoxy(5,2);
cout<<"---------------------------------------------------\n";
gotoxy(5,3);cout<<"|";
gotoxy(25,3);cout<<"Tiket Pesawat";
gotoxy(55,3);cout<<"|\n";

gotoxy(5,4);
cout<<"---------------------------------------------------\n";

gotoxy(5,5);cout<<"|Id Penumpang    :";gets(id);
gotoxy(55,5);cout<<"|\n";                                        //di inputkan
gotoxy(5,6);cout<<"|Nama Penumpang  :";gets(np);
gotoxy(55,6);cout<<"|\n";

gotoxy(5,7);
cout<<"---------------------------------------------------\n";
gotoxy(5,8);cout<<"|Kode Penerbangan      :"<<kp<<endl;
gotoxy(55,8);cout<<"|\n";                                        //arrray tabel
gotoxy(5,9);cout<<"|Maskapai Penerbangan  :"<<mk<<endl;
gotoxy(55,9);cout<<"|\n";
gotoxy(5,10);cout<<"|Class Penerbangan     :"<<c<<endl;
gotoxy(55,10);cout<<"|\n";
gotoxy(5,11);cout<<"|Jadwal Penerbangan    :"<<jp<<endl;         //output
gotoxy(55,11);cout<<"|\n";

gotoxy(5,12);
cout<<"---------------------------------------------------\n";
gotoxy(5,13);cout<<"| Harga                :"<<h<<endl;
gotoxy(55,13);cout<<"|\n";
gotoxy(5,14);cout<<"|Jumlah Tiket          :";cin>>jt;
gotoxy(55,14);cout<<"|\n";

gotoxy(5,15);
cout<<"---------------------------------------------------\n";
tb=jt*h;
gotoxy(5,16);cout<<"|Total Bayar                    :"<<tb<<endl;
gotoxy(55,16);cout<<"|\n";

gotoxy(5,17);
cout<<"---------------------------------------------------\n";




 gotoxy(20,20);cout<<"----------------------------------------------"<<endl;
 gotoxy(20,21);cout<<"                                             |"<<endl;
 gotoxy(20,22);cout<<"----------------------------------------------"<<endl;

  int y;
for(y=1;y<20;y++)                                                            //for untuk tulisan berjalan
{                                                                           //menampilkan tulisan berjalan
delay(100);

gotoxy(y,21);cout<<" *****Selamat Jalan,Semoga Sampai Tujuan!*****";
gotoxy(20,21);cout<<"|";
}
 break;
 }
 default:
 cout<<"Maaf, Kode Yang Diinputkan Salah"<<endl;               //jika salah memilih kode layanan
 break;
 }
 cout<<endl<<endl;
 cout<<"Masih Ada Data [y/t] :";cin>>mad;                     //menampilkan jika masih ada data atau tidak
 clrscr();
 }
  gotoxy(27,7);cout<<"--------------------------"<<endl;
  gotoxy(27,8);cout<<"                         |"<<endl;
  gotoxy(27,9);cout<<"--------------------------"<<endl;
  int i;
for(i=1;i<29;i++)                                           //for untuk tulisan berjalan
{                                                          //menampilkan tulisan berjalan
delay(100);

gotoxy(i,8);cout<<" *****Terima Kasih*****";
gotoxy(27,8);cout<<"|";
}
 gotoxy(27,11);cout<<"      STMIK-AMIK-RIAU        "<<endl;
 gotoxy(27,13);cout<<"       TEGUH A  LFALAH         "<<endl;     //output jika tidak ada data lagi
 gotoxy(27,14);cout<<"     16.10.031.802.109       "<<endl;
 gotoxy(27,16);cout<<"     Dasar Pemrograman       "<<endl;
 gotoxy(27,18);cout<<"            2017             "<<endl;

 }

2. Copy dan Paste syntak tersebut kedalam aplikasi Dev atau Turbo C++, pahamilah setiap perintah program jika terjadi error, kalian pasti bisa mengatasinya.

Tampilan Awal
Membuat Program Transportasi Udara di Bahasa Pemrograman C++ dan C
Tampilan Akhir
Membuat Program Transportasi Udara di Bahasa Pemrograman C++ dan C

Untuk lebih lanjutnya, silahkan copy paste syntak diatas di aplikasi dev atau turbo kalian lalu run untuk melihat hasilnya.

Dengan pembuatan program Transportasi Udara ini diharapkan kepada sasaran dari tujuan pembuatan program ini dapat mempermudah pihak-pihak yang ada di bandara.


Baiklah itu saja pembahasan kali ini mengenai Membuat Program Transportasi Udara di Bahasa Pemrograman C++ dan C, ssemoga bermanfaat untuk kita semua khususnya bagi pembaca. Tetap semangat, pantang menyerah dan teruslah belajar dan terus belajar. Semoga sukses. Selamat mencoba. Terimakasih ...

Post a Comment

1 Comments

  1. makasih min, siap juga tugas ane. ditunggu artikel selanjutnya..

    ReplyDelete