Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

More Books

Students also viewed these Databases questions

Question

c. What were you expected to do when you grew up?

Answered: 1 week ago

Question

4. Describe how cultural values influence communication.

Answered: 1 week ago

Question

3. Identify and describe nine cultural value orientations.

Answered: 1 week ago