Question: 1. Task 1 demonstrate a multi statement if, post increment operator, and escape sequence a. Write a statement that prints Beat those Kats Jacks! (print
1. Task 1 demonstrate a multi statement if, post increment operator, and escape sequence
a. Write a statement that prints Beat those "Kats" Jacks! (print the quotes too hint: Sneak peek ahead to escape sequence on page 126 and in video) regardless of a win or loss.
b. Declare and initialize an integer variable named winCount to hold 0.
c. Prompt the user to enter an integer score for the lumberjacks. Store the value entered.
d. Prompt the user to enter an integer score for the opposing team. Store the value entered.
e. Write an if statement that will print the words Lumberjacks WIN! and a statement that uses the postincrement operator (Hint: page 55 in textbook and on video) to add 1 to the total wins when the home score is greater than the visitor score.
f. Write a statement that prints the winCount. This should not be part of the if statement; it should print every time the program runs.
g. Run your program twice, first testing for an SFA win, and then testing when SFA does not win.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
