Belajar Borland-C++ Administrasi
Sabtu, 6 Mei 2017
Add Comment
Apa Kabar Kalian Semua Buat Para Programmer
Kali Ini Gua Akan Membahas Sebuah Codingan Borland C++
Sebagai Contoh
Borland Terdiri Dari
#include<iostream.h> Berguna Untuk Mendeteksi Suatu Data . Inputan
#include<conio.h>
Oke Ga Usah Lama-Lama Lagi
- Codingan Administrasi :
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<string.h>
main()
{
char pet[15],cust[16],month[6],kode,Kamar[10],lagi;
long harga,jum,diskon,bayar,uang,kembalian;
int in,out,sewa;
awal:
clrscr();
cout<<"===============================================\n";
cout<<"\t Fandy.Ye\n";
printf("\t Jln.Bogor.Ga.Tau Lagi");
cout<<"\n===============================================\n";
cout<<"Nama Petugas :";gets(pet);
cout<<"Nama Costumer :";gets(cust);
cout<<"Tanggal Check in :";cin>>in;cin>>month;
cout<<"=======================================================\n";
clrscr();
printf(" DAFTAR KAMAR YANG TERSEDIA\n");
printf("======================================================\n");
printf("|Kode Kamar | Nama Kamar | Harga Kamar |\n");
printf("======================================================\n");
printf("| D | Deluxe | 250.000 |\n");
printf("| E | Extra | 300.000 |\n");
printf("| S | Super | 400.000 |\n");
printf("| F | Mantap | 500.000 |\n");
printf("=======================================================\n");
cout<<"\nPilih Kode Kamar Dengan Nyaman Dan Mantap [D/E/S/F] : ";cin>>kode;
cout<<"Lama Sewa :";cin>>sewa;
cout<<endl;
switch(kode)
{
case'D':
case'd':
strcpy(Kamar,"Deluxe");
harga=250000;
jum=sewa*harga;
break;
case'E':
case'e':
strcpy(Kamar,"Extra");
harga=300000;
jum=sewa*harga;
break;
case'S':
case's':
strcpy(Kamar,"Super");
harga=400000;
jum=sewa*harga;
break;
case'F':
case'f':
strcpy(Kamar,"Luar Biasa");
harga=500000;
jum=sewa*harga;
break;
}
if(sewa>5)
{
printf("\n>>>Selamat Anda Mendapatkan Diskon 10%<<<\n\n");
diskon=(jum*0.1);
bayar=jum-diskon;
}
else if(sewa>3)
{
printf("\n>>>Selamat Anda Mendapatkan Diskon 5%<<<\n\n");
diskon=(jum*0.05);
bayar=jum-diskon;
}
else
{
printf("\n>>>Maaf Anda Tidak Mendapatkan Diskon <<<\n\n");
diskon=0;
bayar=jum;
}
clrscr();
printf("\n\t\t Bukti PEMESANAN Kamar");
printf("\n\t\t Fandy. Styles Hotel ");
printf("\n\t\t Jln.Bogor Ga.Tau Lagi");
printf("\n----------------------------------------------------\n\n");
printf("Nama Petugas :%s Check in : %d%s",pet,in,month);
out=in+sewa;
printf("\nNama Costumer :%s Check out : %d%s",cust,out,month);
cout<"\n\n====================================================\n\n";
cout<<"\nNama Kamar Yang Di Pesan \t: "<<Kamar;
cout<<"\nHarga Sewa Kamar \t\t :Rp. "<<harga;
printf("\nLama sewa Kamar \t\t :%d (Hari)",sewa);
cout<<"\n\n=====================================================\n";
cout<<"\nJumlah Bayar \t\t :Rp."<<jum;
cout<<"\nDiskon \t\t :Rp."<<diskon;
cout<<"\n\n=====================================================\n";
cout<<"\nTotal Bayar \t\t : Rp."<<bayar;
cout<<"\nUang Bayar \t\t : Rp.";cin>>uang;
kembalian=uang-bayar;
cout<<"Uang Kembalian \t\t : Rp."<<kembalian;
printf("\n\n------------------------------------\n\n");
printf("\t***Terima Kasih Atas Kunjungannya ***");
printf("\n\t*** https://www.Fandy-ye.me ***");
cout<<"\n\nIngin Input lagi[Y/T] :"; cin>>lagi;
if(lagi =='y' || lagi=='Y')
goto awal;
getch();
Dari Codingan Di Atas Akan Membentuk Seperti Ini
Tampilan Gambar 1:
Tampilan Gambar 2:
Dan Tampilan Gambar 3:
Yang Terakhir Hasilnya Seperti Ini:
Yang Belum Punya Aplikasi Borland nya
Download Di Sini
Yang Belum Tau Cara Instalnya Klik Disini http://www.social-network.club/2017/05/cara-instal-borland-c.html#more
Oke Thank You Yang Udah Mampir
}
0 Response to "Belajar Borland-C++ Administrasi "
Catat Ulasan
Komentar !!!