Computer Science, asked by dilruba98, 3 months ago

write a program to accept a number find and print whether the number is even or odd​

Answers

Answered by BrainlyProgrammer
1

Answer:

Assuming it is Java programming

int n=sc.nextInt() ;

if(n%2==0)

System.out.println("Even") ;

else

System.out.println("Odd") ;

Answered by anindyaadhikari13
1

Question:-

Write a program to accept a number and find whether it is odd or even.

Program:-

This is written in Python.

n=int(input("Enter a number: "))

if (n%2==0):

print("Even.")

else:

print("Odd.")

Similar questions