using namespace std;
int main (){
int qty, price, total, discount;
cout<<"Input qty:"; cin>>qty;
cout<<"Input price:"; cin>>price;
cout<<"Total:";
total=qty*price;
if(total>5000)
discount=total*0.02;
if(total<=5000)
discount=total*0;
cout<<"After discount:" <
return 0;
}
No comments:
Post a Comment