- 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 14 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.
-
- Site Admin
- Posts: 899603
- 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