Computer Science, asked by ashwin41566, 5 months ago

Write a java program to check the number 32 is an even or an odd number using
ternary Operator.​

Answers

Answered by sagarikadehury1981
4

Answer:

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 ");

Explanation:

check it please.........

please mark as brainliest and follow me

Answered by ritug6247549
3

Answer:

hope this help!!

pls mark me as brainliest....

Attachments:
Similar questions