Question: (military2.cpp) Make a program that will display one of the messages below depending on the gender and age the user enters 1. Gender Age M

(military2.cpp) Make a program that will display one of the messages below depending on the gender and age the user enters 1. Gender Age M or m 16 or younger You need to wait X more years. (if 15, 2 more years) Morm Between 17 and 42 The military is hiring more people like you. M or m 43 or older F or f Message Thank you for using the system Thank you for using the system, but we were only looking for men Notice that we are allowing the user to enter 'f and 'm' (lowercase) as well as 'F' and 'M (uppercase) for a gender. Ask for an age only if the gender is male. Use the following structure. iffmale) If the user enters an invalid age (negative number), tell him "invalid age" and the prog should end (no need to ask for a new age) else if(female) else //The user entered a letter other than M, m, F or f return 0; //end of program Use the following test cases to test your program. Genger Age Message -1 15You need to wait 2 more years 17The military is hiring more people like you. 43Thank you for using the system. Invalid age Thank you for using the system, but we were only looking for men. Thank you for using the system, but we were only looking for men. Invalid gender
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
