Computer Science, asked by bs5665736, 2 months ago

Write a program to check whether a number is even or odd​ ?

Answers

Answered by Anonymous
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 jayasmita08
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