#include
#include
#include
#include
main()
{
char nama[20][20];
int n, i, kelas[3], jum[20];
long b[20];
cout<<" Fajar Bimantara"<
cin>>n;
cout<
{
cout<<" data ke = "< cout<<" nama pembeli = ";
gets (nama[i]);
cout<<" kelas = ";
cin>>kelas[i];
do
{
cout<<" jumlah pembelian = ";
cin>>jum[i];
if (jum[i]>8)
{
cout<<" maksimal hanya 8 tiket"<
}
while (jum[i]>8);
if (kelas[i]==1)
{
if (jum[i]>=3&&jum[i]<5 p=""> {
b[i]=(jum[i]*250000)*93/100;
}
else
if (jum[i]>=5&&jum[i]<8 p=""> {
b[i]=(jum[i]*250000)*84/100;
}
else
if (jum[i]==8)
{
b[i]=(jum[i]*250000)*73/100;
}
else
{
b[i]= jum[i]*250000;
}
}
else
if (kelas[i]==2)
{
if (jum[i]>=3&&jum[i]<5 p=""> {
b[i]=(jum[i]*475000)*93/100;
}
else
if (jum[i]>=5&&jum[i]<8 p=""> {
b[i]=(jum[i]*475000)*84/100;
}
else
if (jum[i]==8)
{
b[i]=(jum[i]*475000)*73/100;
}
else
{
b[i]= jum[i]*475000;
}
}
else
if (kelas[i]==3)
{
if (jum[i]>=3&&jum[i]<5 p=""> {
b[i]=(jum[i]*678000)*93/100;
}
else
if (jum[i]>=5&&jum[i]<8 p=""> {
b[i]=(jum[i]*678000)*84/100;
}
else
if (jum[i]==8)
{
b[i]=(jum[i]*678000)*73/100;
}
else
{
b[i]= jum[i]*678000;
}
}
cout<
cout<
{
cout<<" Data ke = "< cout<<" Nama pembeli = "<
getch();
}
0 komentar:
Posting Komentar