Computer Science, asked by nikhila777777777, 1 year ago

write the C program for below question

/star WAC PROGRAM WHETHER THE NUMBER IS EVEN OR ODD
star /

Answers

Answered by siddhartharao77
1

Sample Program:

#include<stdio.h>

int main()

{

int i;

printf("Enter a number: ");

scanf("%d",&i);

if(i%2 == 0)

{

printf("%d is even",i);

}

else

{

printf("%d is odd", i);

}

return 0;

}


Output:

Enter a number: 4

4 is even.


Hope it helps!

Similar questions