//programme to check whether a number odd or even using modulo operator
#include <stdio.h>
int main (){
int num;
printf ("entr the number :");
scanf ("%i",&num);
if (num%2==0){
printf ("%i is the even number ",num);
}
else {
printf ("%i is the odd number ",num);
}
return 0;
}
No comments:
Post a Comment