# 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

amount>=2000 and amount<5000 then given 15% discount

amount <2000 then display message "NO DISCOUNT PROVIDED " Find out total payable amount

Expert's answer

#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;

}

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 orderand get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

## Comments

## Leave a comment