Write a program to check whether a number is even or odd ?
Answers
Answered by
0
Answer:
Explanation:
c program:
#include<stdio.h>
void main()
{
int n;
scanf("%d",&n);
if(n%2==0){
printf("even");
}else{
printf("odd");
}
Answered by
0
Answer:
num = int(input("Enter a number to check if its odd or even: "))
if num % 2 == 0:
print(num,"is a even number")
else:
print(num,"is a odd number")
Similar questions
English,
1 month ago
Hindi,
1 month ago
English,
1 month ago
India Languages,
2 months ago
Social Sciences,
9 months ago
Math,
9 months ago