D2 TEKNIK KOMPUTER (BSI PROGRAMMER)
#include
#include
#include
struct
{
char nape[10],kode,almt,*nabar;
int ambil,harga;
}rhyndy[20];
int i,j,tobay;
long int total=0;
main()
{
clrscr();
cout<<"\tBSI EXPRESS"<
cout<
for(i=1;i<=j;i++)
{
clrscr();
cout<<"Data ke"<cout<<"\t Nama Pengirim Barang :";cin>>rhyndy[i].nape;
cout<<"\t Jumlah Barang yang akan dikirim :";cin>>rhyndy[i].ambil;
cout<<"\t Kode Jenis Barang :";cin>>rhyndy[i].kode;
cout<<"\t Alamat Tujuan :";cin>>rhyndy[i].almt;
clrscr();
if(rhyndy[i].kode=='1')
{
rhyndy[i].nabar="Elektronik";rhyndy[i].harga=50000;
}
else if(rhyndy[i].kode=='2')
{
rhyndy[i].nabar="Makanan";rhyndy[i].harga=15000;
}
else
{rhyndy[i].nabar="Sandang";rhyndy[i].harga=35000;}
total=rhyndy[i].ambil*rhyndy[i].harga;
}
clrscr();
cout<<"\t BSI EXPRESS "<
for(i=1;i<=j;i++)
{
gotoxy(2,7+i);cout<gotoxy(7,7+i);cout<
}
cout<<"\n======================================================================"<
getch();
}
Screen Shut Program :