Question: can someone please make thsi to when the input is 6 2 the output is age out of range? but do not use any and

can someone please make thsi to when the input is 62 the output is age out of range? but do not use any and/or operators please!
#include
using namespace std;
int main(){
int age, pitches;
cin >> age;
cin >> pitches;
int restDays =0;
if (age >=7){
if (age <=14){
if (pitches >=66)
restDays =4;
else if (pitches >=51)
restDays =3;
else if (pitches >=36)
restDays =2;
else if (pitches >=21)
restDays =1;
} else if (age >=15){
if (age <=18){
if (pitches >=76)
restDays =4;
else if (pitches >=61)
restDays =3;
else if (pitches >=46)
restDays =2;
else if (pitches >=31)
restDays =1;
} else {
cout << "age out of range" << endl;
return 1;
}
} else {
cout << "age out of range" << endl;
return 1;
}
}
if (restDays ==1){
cout << restDays <<" rest day required" << endl;
} else {
cout << restDays <<" rest days required" << endl;
}
return 0;
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!