Wyo C++

Ch. 4 Worksheet #1

1. List of 5 valid identifiers that can be used as legal variable names. Make sure that you also follow the conventions discussed in class such as beginning a variable name with a lowercase letter and beginning successive words with a capital letter.

 

 

 

2. Write a full, working C++ program that declares integer (int) variables named wins, losses, and ties. Initialize each one to the value of 0 using true initialization statements. The program should then print an output message along with the value of each variable. Make sure that you include a variable dictionary (that is, an inline comment explaining the purpose of each variable in its declaration statement.)

 

 

 

 

 

3. Modify the program that you wrote in Exercise 2 so that a variable named totalPoints is assigned the value of wins plus ties. Make sure that the program prints an additional output message along with the value of totalPoints.