Sabtu, 05 November 2016

Program Tiket Konser

Selamat Menjelang Pagi Kawan, ini program borland c++  PROGRAM TIKET KONSER yang pernah saya buat untuk Nilai UTS Semester 1 di BSI.
padahal kesukaan saya buat program menggunakan cin cout, apalah daya saya yang hanya seorang mahasiswa yang patuh ke dosen. hihihi.......
tak usah berlama - lama bercandanya 
#include <iostream.h>
#include <stdio.h>
#include <conio.h>

 void main()
{
  char  kode[100],kd_tiket[10],judul[100], nampem[100],jenis[100], lagi;
  int  harga, jb, pot, ubay, ukem, total;

  awal:
   clrscr();
  printf("\===============================================================\n");
  printf("\n\t\tMEDIO RECORD ENT.\n");
  printf("\n\t\tPROGRAM TIKET KONSER\n\n");
  printf("\===============================================================\n");
  printf("\nNama Pembeli\t\t\t: ");gets(nampem);
  printf("\nMasukan Kode Tiket [1/2/3]\t\: ");
  scanf("%s", &kd_tiket);
  printf("\nJenis Tiket\t :");
  printf("\n\ta. Tribune.");
  printf("\n\tb. VIP.");
  printf("\n\tc. VVIP.\n");

  printf("\nPilih Jenis [a/b/c]\t\t: ");
  scanf("%s", &kode);
  printf("\nJumlah Beli\t\t\t: ");
  scanf("%i", &jb);

  if (strcmpi(kd_tiket,"1")==0)
  {
  strcpy(judul,"Java Jazz Festival ");

  if (strcmpi(kode,"a")==0)
  {strcpy(jenis,"Tribune");
  harga=50000;
  }
  else if(strcmpi(kode,"b")==0)
  {strcpy(jenis,"VIP");
  harga=75000;
  }
  else if(strcmpi(kode,"c")==0)
  {strcpy(jenis,"VVIP");
  harga=100000;
  }
  else
  harga=0;

}
  else if(strcmpi(kd_tiket,"2")==0)
  {
  strcpy(judul,"Young Diva In Concert ");
  if (strcmpi(kode,"a")==0)
  {strcpy(jenis,"Tribune");
  harga=50000;
  }

  else if(strcmpi(kode,"b")==0)
  {strcpy(jenis,"VIP");
  harga=100000;
  }
  else if(strcmpi(kode,"c")==0)
  {strcpy(jenis,"VVIP");
  harga=150000;
  }
  else
  harga=0;
}
  else if(strcmpi(kd_tiket,"3")==0)
  {
  strcpy(judul,"LA Light Inie Fest \n");
  if(strcmpi(kode,"a")==0)
  {strcpy(jenis,"Tribune");
  harga=50000;
  }

  else if(strcmpi(kode,"b")==0)
  {strcpy(jenis,"VIP");
  harga=90000;
  }
  else if(strcmpi(kode,"c")==0)
  {strcpy(jenis,"VVIP");
  harga=130000;
  }
  else
  harga=0;
}
else
{
printf("\nKode Yang Anda Masukan Salah");
printf("\nIngin Pesan Lagi [Y/T]\t: ");
scanf("%s",lagi);

if(lagi=='Y'||lagi=='y')

goto awal;

else

goto end;
  }

total=harga*jb;
if(jb>=5)
pot=0.1*total;
else
pot=0;

  clrscr();
  printf("\n===============================================================");
  printf("\n\t Daftar Pemesanan Tiket Konser");
  printf("\n===============================================================");
  printf("\nNama Pembeli\t\t: %s",nampem);
  printf("\nJudul Konser\t\t: %s",judul);
  printf("\nJenis Tiket\t\t: %s",jenis);
  printf("\nHarga Tiket\t\t: %i",harga);
  printf("\nJumlah Beli\t\t: %i",jb);
  printf("\n===============================================================");
  printf("\nTotal Harga\t\t: %i",total);
  printf("\nPotongan\t\t: %i",pot);
  total=total-pot;
  printf("\n\nTotal Bayar\t\t: %i ",total);

  printf("\n===============================================================");
  printf("\nUang Bayar\t\t: ");
  scanf("%i",&ubay);
  ukem=ubay-total;
  printf("\nUang Kembali\t\t: %i ",ukem);
  printf("\n==============================================================");
  printf("\n\t\tHave Fun And Enjoy The Show.....");
  getch();
  end:
  }













Mohon maaf kalau program ini kurang maksimal, tetap semangArt dan terus berdo'a kepada Tuhan yang telah melancarkan usaha kita.


http://seperti-mimpiku.blogspot.co.id/          Tio Fajar Priyanto

Tidak ada komentar:

Posting Komentar