Array-promo

Question

Check Whether the number is Even Or odd number. 

Example 1:
Enter an Integer number:
12
Entered number is even
Example 2:
Enter an Integer number:
13
Entered number is odd

Share code with your friends

Share on whatsapp
Share on facebook
Share on twitter
Share on telegram

Code

import java.util.Scanner;
public class EvenOdd
{
  public static void main(String args[])
  {
    int num;
    System.out.println("Enter an Integer number:");

    /*The input provided by user is stored in num*/
    Scanner input = new Scanner(System.in);
    num = input.nextInt();

     /* If number is divisible by 2 then it's an even number else odd number */
    if ( num % 2 == 0 )
        System.out.println("Entered number is even");
     else
        System.out.println("Entered number is odd");
  }
}

Coding Store

Sale

Original price was: ₹80.Current price is: ₹50.
Sale

Original price was: ₹250.Current price is: ₹150.
Sale

Original price was: ₹350.Current price is: ₹200.
Sale

Original price was: ₹80.Current price is: ₹50.
Sale

Original price was: ₹80.Current price is: ₹50.
Sale

Original price was: ₹80.Current price is: ₹50.
Sale
Mastering Array

Original price was: ₹80.Current price is: ₹50.
Sale

Original price was: ₹80.Current price is: ₹50.
Sale

Original price was: ₹80.Current price is: ₹50.
Sale

Original price was: ₹80.Current price is: ₹50.
Sale

Original price was: ₹250.Current price is: ₹150.
Sale

Original price was: ₹350.Current price is: ₹200.
Sale

Original price was: ₹80.Current price is: ₹50.
Sale

Original price was: ₹80.Current price is: ₹50.
Sale

Original price was: ₹80.Current price is: ₹50.
Sale
Mastering Array

Original price was: ₹80.Current price is: ₹50.
Sale

Original price was: ₹80.Current price is: ₹50.
Sale

Original price was: ₹80.Current price is: ₹50.
Sale

Original price was: ₹80.Current price is: ₹50.
Sale

Original price was: ₹250.Current price is: ₹150.
Sale

Original price was: ₹350.Current price is: ₹200.
Sale

Original price was: ₹80.Current price is: ₹50.
Sale

Original price was: ₹80.Current price is: ₹50.
Sale

Original price was: ₹80.Current price is: ₹50.
Sale
Mastering Array

Original price was: ₹80.Current price is: ₹50.
Sale

Original price was: ₹80.Current price is: ₹50.
Sale

Original price was: ₹80.Current price is: ₹50.

Leave a Reply

Your email address will not be published. Required fields are marked *