Question: d. Code a while loop that keeps printing Cowabunga Dude! as long as the user enters 'Y' for the loop- control variable. Assume the loop-control

 d. Code a while loop that keeps printing "Cowabunga Dude!" as

d. Code a while loop that keeps printing "Cowabunga Dude!" as long as the user enters 'Y' for the loop- control variable. Assume the loop-control variable, seeMovie, is already declared along with input for the Scanner class. The while loop requires a priming read for the loop-control variable before entering the loop. Create your own prompt for the loop-control variable. Code a while loop that determines and prints the winnings for the Davtona 500 depending upon the position after the finish-line: 1st, 2nd, or 3rd. i. Assume the input variable for the Scanner class, position and prizeMoney variables are already e. declared ii. Declare noWinners variable, and initialize it to the number ot winners. iii. Declare a counter-control variable for the while loop, and initialize it. iv. When the loop is entered, prompt: The driver crossed the finish line in which place? v. Insert the if-else structure from b into the while loop, and include code from. vi. Print the following according to the position number where the $Z,ZZZ,ZZ9 is the amount of the prize money. The Z's suppress the printing of leading zeroes and the 9 denotes printing of any number from 0-9: 1st place: You're the first place winner and you get $Z,zZZ,ZZ9! 2nd place: You're the second place winner and you get $Z ZZz,zz9! 3rd place: You're the third place winner and you get $Z,ZZZ,Zz9

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!