Advertisement
bayu1st

Untitled

Oct 14th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.39 KB | None | 0 0
  1. #include <iostream>
  2. #include <conio.h>
  3. #include <windows.h>
  4.  
  5. using namespace std;
  6. int main ()
  7. {
  8.     char Kasir[100],NamaB[100],KodeB[20];
  9.     int HargaB,JumlahB,Total,Disk,cash,TotalB;
  10.     float Kembalian;
  11.    
  12.     system ("color 20");
  13.     cout<<":::::::::::::::::::::::::TOKO KELONTONG HALAL:::::::::::::::::::::::::";
  14.     cout<<"\n\n";
  15.     cout<<"Nama Kasir    : "; cin.getline(Kasir, 100) ;
  16.     cout<<"\n";
  17.     cout<<"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::";
  18.     cout<<"\n";
  19.     cout<<" Kode Barang   : ";cin.getline(KodeB, 100);
  20.     cout<<" Nama Barang   : ";cin.getline(NamaB, 100);
  21.     cout<<" Harga Barang  : Rp.  ";
  22.     cin>>HargaB;
  23.     cout<<" Jumlah Barang : ";
  24.     cin>>JumlahB;
  25.     Total=HargaB*JumlahB;
  26.     cout<<" Total Belanja : Rp. "<<Total;
  27.     cout<<"\n";
  28.     cout<<" Tunai         : Rp. ";
  29.     cin>>cash;
  30.     cout<<"\n\n";
  31.     cout<<"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::";
  32.     cout<<"\n\n";
  33.     Total=HargaB*JumlahB;
  34.    
  35.    
  36.    
  37.     cout<<" Total Belanja : Rp. "<<Total;
  38.     cout<<"\n";
  39.     cout<<" Potongan      : Rp. ";cin>>Disk;
  40.     TotalB=Total-Disk;
  41.     cout<<"\n";
  42.     cout<<" Total Bayar   : Rp. "<<TotalB;
  43.     cout<<"\n";
  44.     cout<<" Tunai         : Rp. "<<cash;
  45.     cout<<"\n";
  46.     Kembalian=cash-TotalB;
  47.     cout<<" Kembalian     : Rp. "<<Kembalian<<endl;
  48.     cout<<"-----------------------------------------------------------------------";
  49.     cout<<"\n\t\t\t TERIMA KASIH \t\t\t";
  50.     getch ();
  51.    
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement