Answer to Question #22029 in C++ for singh

Question #22029
write a program input bill amount if the bill amount>=5000 then give 25%discount
amount>=2000 and amount<5000 then given 15% discount
amount <2000 then display message "NO DISCOUNT PROVIDED " Find out total payable amount
1
Expert's answer
2013-01-21T08:37:04-0500
#include <iostream>

using namespace std;

int main()
{
cout << "please input amount" << endl;
int n;
cin>>n;

if(n>=5000)
{
cout<<" 25%discount amount";
int k;
k=n*0.75;
cout<<"total payable amount="<<k;
}

if(n>=2000 && n<5000)
{
cout<<" 15%discount amount";
int k;
k=n*0.85;
cout<<"total payable amount="<<k;
}

& if(n<2000)
{
cout<<"NO DISCOUNT PROVIDED";
int k;
k=n*1;
cout<<"total payable amount="<<k;
}
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS