Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Age Negative 16 or younger Between 17 and 42 43 or older Message Invalid age ou

ID: 3754550 • Letter: A

Question

Age Negative 16 or younger Between 17 and 42 43 or older Message Invalid age ou need to wait X more years. (if 15, 2 more years) The military is hiring more people like you. Thank you for using the system. HINT CORRECT. (= goes on the right side of>) Syntax erroris on the wrong side) Syntax error (do not use space between > and Test your program using the following ages. Age Message 10 Invalid age Invalid age You need to wait 17 more years You need to wait 4 more years 13 16You need to wait 1 more years 17 The military is hiring more people like you 30 The military is hiring more people like you 42 The military is hiring more people like you 43Thank you for using the system. 50 Thank you for using the system. The testing technique used above is called "boundary testing". Use the numbers below and above each border and another number in between. -10 Invalid age -1 13You need to wait X more years 16 17 30 The military is hiring more people like you 42 Thank you for using the system. 50

Explanation / Answer

As you haven't specified any language I have done in Java. Please comment if you want it any other language.

Code:

=====

#include <iostream>

using namespace std;

int main() {

int age = 0;

cout<<"Enter your age: ";

cin>>age;

cout<<endl;

if(age<0) {

cout<<"Invalid age"<<endl;

}

else if(age>=0 && age<=16) {

cout<<"You need to wait "<<(17-age)<<" more years"<<endl;

}

else if(age>=17 && age<=42) {

cout<<"The military is hiring more people like you"<<endl;

}

else if(age>=43 && age<=50) {

cout<<"Thank you for using the system"<<endl;

}

  

}