Question: Given integer time, write multiple if statements: If time is greater than or equal to 22, output I can finish half of my homework. If

Given integer time, write multiple if statements:

If time is greater than or equal to 22, output "I can finish half of my homework."

If time is greater than 35, output "I can complete my homework."

If time is less than or equal to 7, output "I don't have time to do my homework."

End with a newline.

Ex: If the input is 37, then the output is:

I can finish half of my homework. I can complete my homework.

#include using namespace std;

int main() { int time;

cin >> time; /* Your code goes here */

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!