Computer Science, asked by taranakidwai46, 4 months ago

write a program which checks whether a number is even or odd​


allysia: Programming language?

Answers

Answered by allysia
1

Language:

PYTHON

Program:

\\\tt a=int(in p ut("Enter\ a\ na me: "))  \\\tt if\ a\%2==0: \\\tt {\qquad print("Even\ number" )} \\\tt else: \\\tt  {\qquad print("Odd\ number")}

Explanation:

  • Accepts a number and saves it in a.
  • If statement checks if the number is odd or even.
Similar questions