Write an algorithm to check that the input number is even or odd
Answers
Answered by
1
I'm assuming that the programming language is Python.
a = float(input ("enter the number")
if (a%2 = 0) :
print ("it is an even number")
else:
print ("it is an odd number")
Hope this helps you.
Output :-
Enter the number 23.3
Odd.
Similar questions
Social Sciences,
4 months ago
World Languages,
4 months ago
Economy,
9 months ago
English,
9 months ago
Math,
1 year ago
Math,
1 year ago