Computer Science, asked by sreetamabarman40, 7 months ago

Write a program to determine whether an input number is an odd number. ans should be in blue j programing process.​

Answers

Answered by Anonymous
3

Explanation:

import java.util.Scanner;

public class EvenOdd {

public static void main(String[] args) {

Scanner reader = new Scanner(System.in);

System.out.print("Enter a number: ");

int num = reader.nextInt();

if(num % 2 == 0)

System.out.println(num + " is even");

else

System.out.println(num + " is odd");

}

}

Similar questions