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
int main() { int time;
cin >> time; /* Your code goes here */
return 0; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
