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.
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
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.
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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!