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

}

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

for any assignment or question with DETAILED EXPLANATIONS!

## Comments

## Leave a comment