1) Given the following code, write a conditional logic statement that that evaluates to true if userInput is on [24, 36] and also odd.

#include
using namespace std;

int main() {
int userInput = 0;
cout
cin >> userInput;

if( /* your condition */) {
    cout
}

return 0;
}

2) Given the following code, write a conditional logic statement that evaluates to true if userInput is divisible by 3 and 7.

#include
using namespace std;

int main() {
int userInput = 0;
cout
cin >> userInput;

if( /* your condition */) {
    cout
}

return 0;
}

3) Given the following code, write a conditional logic statement that evaluates to true if userInput is not equal to 22 or 24 and even.

#include
using namespace std;

int main() {
int userInput = 0;
cout
cin >> userInput;

if( /* your condition */) {
    cout
}

return 0;
}

PLEASE ANSWER THE 3 QUESTIONS ABOVE USING THE GIVEN CODE AND INFORMATION IN EACH QUESTION.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *