Write a Java program that: Ask user to enter the last two digits of the Student ID number and store it in a variable of type integer; Use a while loop to print all the positive odd numbers smaller than the inputted number. After the while loop, make a for loop to print all the positive even numbers smaller than the inputted

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter5: Looping
Section: Chapter Questions
Problem 15E
icon
Related questions
Question

 

Write a Java program that:

  • Ask user to enter the last two digits of the Student ID number and store it in a variable of type integer;
  • Use a while loop to print all the positive odd numbers smaller than the inputted number.
  • After the while loop, make a for loop to print all the positive even numbers smaller than the inputted

Note:

  1. Your answer should have the code as text, as well as a screenshot of the code with the output. 

The inputted number should be the last two digits of your Student ID number. 

ID is : 190058401

Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,