Question
Looping: be able to print the numbers 1 to 10 on one line using a print statement within a loop (using a do while and
Looping:
be able to print the numbers 1 to 10 on one line using a print statement within a loop (using a do while and using a while loop!)
Be able to read in a positive whole number only (one that is 1 or larger) using a while loop or do while loop
Be able to print the odd numbers from some low number to some high number entered by the user.
Console Input:
Be able to import the Scanner class
Be able to use the Scanner class to define the keyboard for input
Be able to define a Scanner object (named whatever I request)
Be able to input a String, int, double, or char using the keyboard
Know that you must first prompt the user for input
Know that you need to use System.out.print() as the prompt if you wish to keep the keyboard entry on the same line.
Be able to read in number from the keyboard and compute results based on that number (use the number in a computation).
Be able to read a string from the keyboard after an int (and know why this is a problem!)
printf - Know what the codes are and how they are used
Be able to write an if else if else statement For example, I might say: Read in a positive integer. Read in a string. Read in a positive double. I might add: Check to see if the number read in by the user is negative. If it is, then tell the user it is invalid. Determine if the number is even or odd. Tell them it is even or odd.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started