0
What is grade in the following program?
#include <iostream> using namespace std; int main() { int age = 20; int grade = 80; if (age > 16 && age < 60 && grade > 50) { cout << "Accepted!" << endl; } return 0; }
1 Réponse
+ 3
How I see it, grade is 80 and it is more than 50 in your condition so it pass. Age is 20 and it is more than 16 and less than 60. In your if statement all tree conditions need to be true and in your case they are.... so it will write out Accepted!...