60 636
Assignments Done
97,8%
Successfully Done
In April 2018

Answer to Question #29427 in C++ for Bad

Question #29427
Write c++ program for calculation of discount of a group. In a group there is 2 gender, male and female. If the group has at least 5 male,10% discount will be given. If the group has more than 5 person (male and female), 25% discount will be given. If the group has at least 15 persons (male and female), 30% discount will be given.
Expert's answer
//Write c++ program for calculation of discount of a group. In a group there
//is 2 gender, male and female. If the group has at least 5 male,10% discount
//will be given. If the group has more than 5 person (male and female), 25%
//discount will be given. If the group has at least 15 persons (male and
//female), 30% discount will be given.

# include <iostream>

using namespace std;



int main(){
cout<<"Enter amount of male persons:";
int m,f;
cin>>m;
cout<<"Enter amount of female persons:";
cin>>f;

int disk=0;
if (m==5) disk=10;
if (m+f>5) disk=25;
if (m+f>=15) disk=30;
cout<<"Your discount is "<<disk<<"%\n";
system("PAUSE");
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 first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions