RSS

tugas progarm menghitung besarnya diskon

Nim                 : 12110004
Nama              : Aditya pradana
Kelas               : 12 1A 04


/*pembuatan garis fungsi*/
#include <stdio.h>
#include <conio.h>
#include <iostream.h>
garis()
{
printf("\n------------------------------\n");
}
/*program utama*/
main()
{
double tot_beli,potongan =0,jum_bayar=0;
clrscr();
cout<<"PENGHITUNG BESARNYA DISKON"<<endl;
garis();// memangil fungsi garis
cout<<"total pembelian Rp.";cin>>tot_beli;

if (tot_beli >=1000000)
potongan=0.20 * tot_beli;
else
if (tot_beli >=5000000)

potongan=0,35 *tot_beli;
cout<<"besarnya potongan Rp."<<potongan<<endl;
jum_bayar = tot_beli - potongan;
garis();//memangil fungsi garis
cout<<"jumlah yang harus dibayarkan Rp."<<jum_bayar;
getch() ;
}

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 komentar:

Pages

Popular Posts

Diberdayakan oleh Blogger.

profil aditya pradana