#include<stdio.h>
#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
main()
{
int i,j,jbeli[20],tjbeli=0;
char nama[20][20],kode[20];
long harga[20],diskon,totalp,gtotal=0,total[20];
puts("\t\tDAFTAR PENJUALAN TIKET");
puts("=========================================");
cout<<"Masukkan Banyaknya Data : ";cin>>j;
for(i=1;i<=j;i++)
{cout<<endl;
cout<<"Data Ke-"<<i<<endl;
cout<<"Masukkan Kode Kereta(A/B/T) : ";cin>>kode[i];
if (kode[i]=='A')
{strcpy(nama[i],"Argo Lawu");
harga[i]=300000;}
else if(kode[i]=='B')
{strcpy(nama[i],"Argo Bromo");
harga[i]=250000;}
else if (kode[i]=='T')
{strcpy(nama[i],"Taxaca");
harga[i]=200000;}
else
{strcpy(nama[i],"Kode salah");
harga[i]=0;}
#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
main()
{
int i,j,jbeli[20],tjbeli=0;
char nama[20][20],kode[20];
long harga[20],diskon,totalp,gtotal=0,total[20];
puts("\t\tDAFTAR PENJUALAN TIKET");
puts("=========================================");
cout<<"Masukkan Banyaknya Data : ";cin>>j;
for(i=1;i<=j;i++)
{cout<<endl;
cout<<"Data Ke-"<<i<<endl;
cout<<"Masukkan Kode Kereta(A/B/T) : ";cin>>kode[i];
if (kode[i]=='A')
{strcpy(nama[i],"Argo Lawu");
harga[i]=300000;}
else if(kode[i]=='B')
{strcpy(nama[i],"Argo Bromo");
harga[i]=250000;}
else if (kode[i]=='T')
{strcpy(nama[i],"Taxaca");
harga[i]=200000;}
else
{strcpy(nama[i],"Kode salah");
harga[i]=0;}