tapi tenang aja dah ntar kalo ada waktu gua juga update yang make cout, tapi ya yang sabar aja yahh.. :D
Ditambah lagi kemaren gua baru aja di tolak adsense. Jadi gua lagi semangat-semangatnya nih nge-Blogging. kali aja kapan-kapan dapet $10K.
Jangan lupa share nih scriptnya, kali temen-temen lu juga butuh nih script. kalo ada yang masih error-error PM gua aja. OK guys..
#include <iostream.h>
#include <conio.h>
#include <stdio.h>
void main()
{
char Nama[100], Kode[10], NamaPemesan[100], Jenis[100], JT[100], Lagi;
int Harga, Jumlah, Total, Discount, Bayar, Kembali;
awal:
clrscr();
printf("\n===================================================");
printf("\n\t\t Medio Record Ent.");
printf("\n\t\tPenjualan Tiket Konser");
printf("\n===================================================");
printf("\nNama Pembeli \t\t : ");gets(NamaPemesan);
printf("\nKode Konser [1/2/3] \t : ");scanf("%s", &Kode);
printf("\nJenis Tiket");
printf("\n\ta. Tribune");
printf("\n\tb. VIP");
printf("\n\tc. VVIP");
printf("\nPilih Jenis Tiket [a/b/c] : ");scanf("%s", &Jenis);
printf("\nJumlah Beli \t\t : ");scanf("%i", &Jumlah);
if (strcmpi(Kode, "1")==0)
{
strcpy(Nama, "Java Jazz Festival");
if (strcmpi(Jenis, "a")==0)
{strcpy(JT, "Tribune");
Harga=50000;
}
else if (strcmpi(Jenis, "b")==0)
{strcpy(JT, "VIP");
Harga=75000;
}
else if (strcmpi(Jenis, "c")==0)
{strcpy(JT, "VVIP");
Harga=100000;
}
else
Harga=0;
}
else if (strcmpi(Kode, "2")==0)
{
strcpy(Nama, "Young Diva In Concert");
if (strcmpi(Jenis, "a")==0)
{strcpy(JT, "Tribune");
Harga=50000;
}
else if (strcmpi(Jenis, "b")==0)
{strcpy(JT, "VIP");
Harga=100000;
}
else if (strcmpi(Jenis, "c")==0)
{strcpy(JT, "VVIP");
Harga=150000;
}
else
Harga=0;
}
else if (strcmpi(Kode, "3")==0)
{
strcpy(Nama, "LA Light IndieFest");
if (strcmpi(Jenis, "a")==0)
{strcpy(JT, "Tribune");
Harga=50000;
}
else if (strcmpi(Jenis, "b")==0)
{strcpy(JT, "VIP");
Harga=90000;
}
else if (strcmpi(Jenis, "c")==0)
{strcpy(JT, "VVIP");
Harga=130000;
}
else
Harga=0;
}
else
{ printf("Kode yang Anda Masukan Salah");
printf("Ingin Mendaftar Lagi [Y/T] : ");scanf("%s", Lagi);
if (Lagi=='Y'||Lagi=='y')
goto awal;
else
goto end;
}
Total=Harga*Jumlah;
if (Jumlah>=5)
Discount=0.1*Total;
else
Discount=0;
clrscr();
printf("\n===================================================");
printf("\n\t\t Medio Record Ent.");
printf("\n\t\tPenjualan Tiket Konser");
printf("\n===================================================");
printf("\nNama Pemesan \t\t: %s", NamaPemesan);
printf("\nJudul Konser \t\t: %s", Nama);
printf("\nJenis Tiket \t\t: %s", JT);
printf("\nHerga Per Tiket \t: %i", Harga);
printf("\nJumlah Beli \t\t: %i", Jumlah);
printf("\n===================================================");
printf("\nTotal Harga \t\t: %i", Total);
printf("\nDiscount \t\t: %i", Discount);
Total=Total-Discount;
printf("\n\nTotal Bayar \t\t: %i", Total);
printf("\n===================================================");
printf("\nUang Bayar \t\t: ");scanf("%i", &Bayar);
Kembali=Bayar-Total;
printf("\nUang Kembali \t\t: %i", Kembali);
printf("\n===================================================");
printf("\n\n\t Have Fun and Enjoy the SHOW !!");
getch();
end:
}
Okay Guys, sekian dari gua nihh.. seneng-seneng lu pada ya liat nih script.. semoga bermanfaat ya.
Selamat malam :D
EmoticonEmoticon