Question: Goal: Learn how to use a while loop to validate user input. Assignment: Given a previously declared variable userInput, write a snippet of code that

Goal: Learn how to use a while loop to validate user input.
Assignment: Given a previously declared variable userInput, write a snippet of code that continuously prompts the user for an integer input
and displays the input, until that input is a multiple of 3. Don't forget to initialize userInput to a desirable value. No input validation is needed
in this assignment.
1// Write your code below
Goal: Learn how to use a while loop to validate

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 Programming Questions!