Page 1 of 1

Predict the output for the C++ program in Program Q2. 8. 10. Program Q2 1. int age; 2. if(age>12) 3. { 4. if(age<=18) 5.

Posted: Wed Apr 27, 2022 5:03 pm
by answerhappygod
Predict The Output For The C Program In Program Q2 8 10 Program Q2 1 Int Age 2 If Age 12 3 4 If Age 18 5 1
Predict The Output For The C Program In Program Q2 8 10 Program Q2 1 Int Age 2 If Age 12 3 4 If Age 18 5 1 (80.55 KiB) Viewed 16 times
Predict the output for the C++ program in Program Q2. 8. 10. Program Q2 1. int age; 2. if(age>12) 3. { 4. if(age<=18) 5. { 6. cout<< "Category D”; 7. } else 9. { cout<<< "Category C"; 11. } 12. } 13. else 14. { if (age > 2) 16. { 17. cout<<< "Category B"; 18. } 19. else 20. { 21. cout << "Category A”; 22. } 23. } 15. W Answer Age Output 27 13 8 2 12.7