//*Pernyataan IF.cpp*// #include<stdio.h> #include<conio.h> #include<iostream.h> main() { double tot_beli, potongan=0,jum_bayar=0; clrscr(); cout<<”Total Pembelian Rp. “;cin>>tot_beli; if (tot_beli >= 50000) potongan = 0.2 * tot_beli; cout<<”Maka Besarnya Potongan Rp. “<<potongan<<endl; jum_bayar = tot_beli – potongan; cout<<”Jumlah Yang Harus Dibayar Rp. “,jum_bayar; getch(); } //*Pernyataan IF – ELSE*// #include<stdio.h> #include<conio.h> #include<iostream.h> main() [...]
Filed under: Awal | Tinggalkan sebuah Komentar »