Program potongan harga

by 4:02 PM 0 comments
#include <iostream>

using namespace std;

int main()
{
    unsigned long int total,potongan,bayar;     potongan=0;
    cout << "toko\n";
    cout << "total pembayaran RP: ";
    cin >> total;
    if(total <=50000)
    cout << "tidak dapat potongan\n";
    else
    if(total >=50000)
    potongan = (total*0.20);
    bayar = total - potongan;
    cout << "potongan 20% Rp:" << potongan << endl;
    cout << "total bayar Rp:" << bayar << endl;
    return 0;
}

Unknown

Developer

0 comments:

Post a Comment