Checkpoint 4.3.1.
What will be printed after
main
is executed?
#include <iostream>
using namespace std;
void weather(int temp) {
if (temp < 52) {
cout << "It is cold!";
}
else {
cout << "It is warm!";
}
}
int main() {
int degrees = 52;
weather(degrees);
}
- It is cold!
- That statement would print if degrees was less than 50.
- It is warm!
- Correct!
- Nothing prints.
- One of the statements is satisfied, so something does print.
- Error message.
- There is nothing in the code below that would generate an error.