Why Open Source

Open Source is not a concept, it's thought process.

Keep Watching this Space

This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

Keep Watching this Space

This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

Blog for open Source lovers

We live in a World of Technology and that tecnoglogy is for All to explore and understand. Period. !!

Showing posts with label odd. Show all posts
Showing posts with label odd. Show all posts

Tuesday, November 22, 2016

How to find Even and Odd Number using Java

Although identifying a number as even or odd it's one of the easiest thing to do. However, just for the sake of knowledge and it's implementation with Java is our prime goal here and hence this post. The logic is simple. Any number which when divided by two leaves no remainder is considered as even and the number which leaves a remainder is odd. This is how we implement it using Java.


This Program is self explanatory and implemented in most easiest way. Please go through it and try implementing with your own logic also. We are using the Scanner java object to ask for user inputs continuously to check if the number is even or odd and until user enters 0 which will break the while loop and program exits.