Computer Science, asked by manya12316, 8 months ago

write a program in java to input a number from user and print the number even or odd

Answers

Answered by meghashyam52
2

Answer: hey mate pls do follow me and mark as  brainliest

Explanation:

Java Program to Check if a Given Integer is Odd or Even

public class Odd_Even.

int n;

Scanner s = new Scanner(System.

System. out. print("Enter the number you want to check:");

n = s. nextInt();

if(n % 2 == 0)

System. out. println("The given number "+n+" is Even ");

System. out. println("The given number "+n+" is Odd ");

Similar questions