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.
1
Expert's answer
2013-05-08T11:51:54-0400
//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; }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment