PROGRAM PENGELOLAHAN BARANG.
disini saya membuat program pengelolahan barang demgan menggunakan bahasas pemroghraman c++,.
#include <iostream.h>
#include <conio.h>
void main()
{
clrscr();
int n,k,jml;
char nama[50];
long h,ga,th,dis,ba,um;
clrscr();
cout<<"\t PROGRAM PENGELOLAHAN DATA PENJUALAN BARANG \n";
cout<<"\t==============================================\n";
cout<<"Jumlah Item Barang Yang terjual = \n";
cin>>n;
um=0;
for (k=1; k<=n; k++)
{
cout<<"Item Barang yang ke = "<<k<<"\n";
cout<<"Masukkan Nama Barang = ";
cin>>nama;
cout<<"Masukkan Harga Satuan = ";
cin>>h;
cout<<"Masukkan Jumlah Barang = ";
cin>>jml;
th=h*jml;
dis=th*0.1;
ba=th-dis;
um+=ba;
cout<<"total Harga = "<<th<<"\n";
cout<<"Besar Diskon = "<<ba<<"\n";
cout<<"Jumlah Bayar = "<<um<<"\n";
cout<<"\n";
}
cout<<"\t============================================\n";
cout<<"\tJumlah Uang masuk = "<<um<<"\n";
cout<<"\t--------------------------------------------\n";
}
Tidak ada komentar:
Posting Komentar