Question: Code a variable of type Scanner and name it input Read in the user's favorite number and assign it to an integer variable named favNum.

Code a variable of type Scanner and name it input Read in the user's favorite number and assign it to an integer variable named favNum. Note: be sure to prompt the user before reading in the number. Users don't know what you want unless you tell them. Read in the user's age and assign it to an integer variable called age Note: be sure to prompt the user before reading in the number. Users don't know what you want unless you tell them. Read in the user's name and assign it to a String variable called name Note: be sure to prompt the user before reading in the number. Users don't know what you want unless you tell them. Print out the user's name, age, and favorite number using the printf statement, be sure to label your outputs. Sample Output: Karen your favorite number is 32 and you are 55 years old.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Answer import javautilScanner public class Main public static void mainString arg... View full answer

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 Operating System Questions!