Answer to Question #311918 in C++ for Nobody

Question #311918

Write a complete C++ program that will prompt name, gender (M or F), age (in years) and marital status (single or married) for each student in FISE and calculate the numbers of married men, single men, married women and single women. Printthese numbers on a student summary report. If any single men are over 30 years of age, print their names and ages on a separate eligible bachelor’s report.


1
Expert's answer
2022-03-15T05:54:20-0400

Here is program:

int main()
{
	string name;
	int gender;
	int age;
	int maritalstat;
	cout << "Enter name: " << endl;
		cin >> name;
		cout << "Enter gender: " << endl;
		cout << "1) Male" << endl;
		cout << "2) Female" << endl;
		cin >> gender;
		cout << "Enter age(in years):" << endl;
		cin >> age;
		cout << "Enter marital status: " << endl;
		cout << "1) Single" << endl;
		cout << "2) Married" << endl;
		cin >> maritalstat;


}

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