ASSIGNMENTS FOR CHAPTER 5 – 4 problems
Each of these programs requires 5 runs/screenshots, showing the various aspects of how the program works. (User entries are shown in red.) You must use an array to solve these problems!
Ask the user for 9 values, either ‘X’ or ‘O’. Check the user input as it is entered. Once the data is entered, process the array to check to see if there are any occurrences of 3 letter X’s. Use the following examples as a guide.
Please enter an X or O for position 0: X
Please enter an X or O for position 1: X
Please enter an X or O for position 2: A
Please follow the directions!
Please enter an X or O for position 2: O
Please enter an X or O for position 3: O
Please enter an X or O for position 4: X
Please enter an X or O for position 5: X
Please enter an X or O for position 6: O
Please enter an X or O for position 7: O
Please enter an X or O for position 8: X
Your answers were: XXOOXXOOX
There are no triples in this data.
Please enter an X or O for position 0: