#include
#include
#include
#include
using namespace std;
void main() {
struct kantin {
string kode;
string nama;
int jumlah;
int harga;
int total;
int grand;
};
int i,j,n,m,x,y,byr,kmbl,grand;
kantin dathitung[10];
clrscr();
cout<<"====================================="<
cout<<" Program Hitung Kantin "<
cout<<" STMIK ROSMA "<
cout<<" Createad by Heri Herdiansah"<
cout<<" 200801151014"<
cout<<"====================================="<
cout<<"Masukan Jumlah Data Barang : ";cin>>n;
cout<
for(j=0;j
{ x=j+1;
cout<<"Data ke - "<
cout<<"Kode Barang : ";cin>>dathitung[j].kode;
cout<<"Nama Barang : ";cin>>dathitung[j].nama;
cout<<"Jumlah : ";cin>>dathitung[j].jumlah;
cout<<"Harga : ";cin>>dathitung[j].harga;
cout<<"====================================="<
dathitung[j].total=dathitung[j].harga*dathitung[j].jumlah;
}
clrscr();
cout<<"=============================================================================="<
cout<<" Daftar Rincian Hitung Kantin"<
cout<<" STMIK ROSMA "<
cout<<" Createad by Heri Herdiansah"<
cout<<" 200801151014"<
cout<<"==============================================================================="<
cout <<>
cout <<>
cout <<>
cout <<>
cout<<"--------------------------------------------------------------------------------"<
for(i = 0; i < y="">cout <
<<>
<<>
<<>
<<>
grand= grand+dathitung[i].total;
}
cout<<"--------------------------------------------------------------------------------"<
cout<< "Grand Total Pembelian : "<
cout<< "jumlah Bayar: ";cin>>byr;
kmbl=byr-grand;
cout<< "jumlah Kembali: "<
cout<
cout<<" Terima Kasih"<
getch();
}
Tidak ada komentar:
Posting Komentar