even odd c
#include <stdio.h>
int main() {
int num;
printf("Enter an integer: ");
scanf("%d", &num);
// True if num is perfectly divisible by 2
if(num % 2 == 0)
printf("%d is even.", num);
else
printf("%d is odd.", num);
return 0;
}
4.67
3
if( num % 2 == 0 )
printf("EVEN!\n");
else
printf("ODD!\n");
Thank you!
3
0
0
6
if((x & 1) == 0)
printf("EVEN!\n");
else
printf("ODD!\n");
Thank you!
6
0
Are there any code examples left?
New code examples in category C
-
C 2022-03-27 22:30:45 Problem Statement Print the following output: \ Input Format IN Output Format \
-
-
-
-
-
-
-