Home /
Expert Answers /
Computer Science /
write-a-c-program-that-asks-the-user-to-input-the-age-and-gender-m-m-for-male-f-f-for-female-o-pa773
(Solved): Write a C++ program that asks the user to input the age and gender (M/m for male, F/f for female) o ...
Write a C++ program that asks the user to input the age and gender (M/m for male, F/f for female) of 10 rabbits. Your program should count the number of female and male rabbits and print the results on the screen. Sample input/output. Enter age and gender: 1m Enter age and gender: 2M Enter age and gender: 4f Enter age and gender:5 F Enter age and gender: 1M Enter age and gender: 2M Enter age and gender: 3F Enter age and gender: 1M Enter age and gender: 2M Enter age and gender:3 F Number of male =6 Number of female =4