Formative Assessment 2 Given the following enum: enum rating {everyone = 1, teens, mature}; Drag and arrange the code blocks below so that the result prints: Game category = 3 Note: Not all code blocks will be used. You have just ONE ATTEMPT at this problem. Drag from here cout << "Game category = " << game << endl; rating game; game = everyone; game = mature; game = teens; Construct your solution here
Added by Candace E.
Close
Step 1
We need to declare the enum rating and the variable game of type rating. Show more…
Show all steps
Your feedback will help us improve your experience
Manisha Sarker and 91 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Write a program called GradesAverage, which prompts the user for the number of students, reads it from the keyboard, and saves it in an int variable called numStudents. It then prompts the user for the grades of each of the students and saves them in an int array called grades. Your program shall check that the grade is between 0 and 100. A sample session is as follows: Enter the number of students: Enter the grade for student 1: 55 Enter the grade for student 2: 108 Invalid grade - try again. Enter the grade for student 2: 56 The average is 56.
Florencia C.
What will be the output of the following C++ code? #include <iostream> using namespace std; enum colour {green, red, blue, white, yellow, pink}; int main() { cout << green << red << blue << white << yellow << pink; return 0; }
Pritesh R.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Watch the video solution with this free unlock.
EMAIL
PASSWORD