< Previous | Contents | Next >
1. Create a list of six legal variable names—three good and three bad choices. Explain why each name falls into the good or bad category.
2. What’s displayed by each line in the following code snippet? Explain each result.
cout << "Seven divided by three is " << 7 / 3 << endl; cout << "Seven divided by three is " << 7.0 / 3 << endl; cout << "Seven divided by three is " << 7.0 / 3.0 << endl;
3. Write a program that gets three game scores from the user and displays the average.