Question: In c++ programming Write a complete program that will verify the eligibility of joining the military from the user's gender and age. Make the following
Write a complete program that will verify the eligibility of joining the military from the user's gender and age. Make the following 2 functions in addition to the main. getInfo This function will ask the user to enter his/her gender and age. The following is a sample run for this function. Enter gender: m Enter age: 21 verify Eligibility This function will return true if the user is eligible to join the military or return false if not eligible. The following is how to determine eligibility. Do not use cout in this function. No females are eligible. If male, he must be at least 18 to be eligible. In the main, call the above functions. Don't forget to tell the user whether he/she is eligible for the military. Following are sample runs. Sample Run1; Enter gender: m Enter age: 21 You are eligible for the military. Sample Run2: Enter gender: f Enter age: 25 You are not eligible for the military. Sample Run 3; Enter gender: m Enter age: 15 You are not eligible for the military. Write your complete program on a separate sheet of paper
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
