Hello! Badly need help. I need to do a program that will produce odd & even numbers using loop structure

Sample output:

Enter a number: 5
This number is an odd number!
Input 1 to run the program again
Input 2 to stop
Enter your Choice: 1
Enter a number: 6
This number is and even number!
Input 1 to run the program again
Input 2 to stop
Enter your choice: 2


This is the standard reply we give users with your type of question, don't take it personally.
We don't just do your project for you. By all means, we will help you if you are stuck and having trouble. But we won't jump in and give you the answer because it doesn't help you get any better.
Posting up what you done so far, or what you have tried, will get your better responses.

So, how much of the question do you understand and can you show us what you've done so far?

I don't know whether you have started/completed this work all by yourself. If you don't know how to start with I will give you few hints, based on that try to do it.

  1. In order to get the number from the user try java.util.Scanner and store it in a variable
  2. Next use if condition to check the remainder of the number divided by 2 equals 0
  3. Use the same scanner for Input 1 to run the program again as well.

Hope this helps.

Varun Krishna. P

This article has been dead for over six months. Start a new discussion instead.