Selasa, 29 April 2014

total pembelian barang menggunakan if else pada c++



//RIZKY AMALIA
//120534400676
//S1 PTE 2012 D
#include<iostream.h>
int main()
{
      char kasir[30],nama[30];
      int hs,hd;
      cout<<"                                             \n";
      cout<<"================RIZKY AMALIA=================\n";
      cout<<"================120534400676=================\n";
      cout<<"^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^\n";
      cout<<"=============================================\n";
      cout<<"****************SELAMAT DATANG***************\n";
      cout<<"=============================================\n";
      cout<<"==============^^^GEMA INSANI^^^==============\n";
      cout<<"                                             \n";
      cout<<"KEPUASAN PELANGGAN ADALAH TANGGUNG JAWAB KAMI\n";
      cout<<"=============================================\n";
      cout<<"Kasir: ";
      cin>>kasir;
      cout<<"Nama Pembeli: ";
      cin>>nama;
      cout<<"=============================================\n";
      cout<<"Total Pembelian barang : Rp ";
      cin>>hs;
      if(hs<50000)
      {
            hd=hs-(hs*5/100);
      }
      else
      {
            hd=hs-(hs*20/100);
      }
      cout<<"Total yang harus di bayar: Rp "<<hd<<endl;
      cout<<"============================================\n";
      cout<<"=======Terimakasih Atas Kunjungan Anda======\n";
      cout<<"============================================\n";
      cout<<"Nb. Barang yang sudah di beli tidak dapat di\n";
      cout<<"kembalikan\n";

}
               

Tidak ada komentar:

Posting Komentar