bsc

Comprehensive codebase and cou...
Log | Files | Refs | Activity | README | LICENSE

root / semester_1 / tuition-c / APC-SPS-007.c

APC-SPS-007.c (312B)


      1 /* WAP to check a number is even or odd using bitwise operator */
      2 
      3 #include<stdio.h>
      4 int main() {
      5 	int x, res = 1;
      6 	printf("Enter a number : ");
      7 	scanf("%d", &x);
      8 	res = res & x;
      9 	if (res == 0) {
     10 		printf("\nInput %d is a even number.", x);
     11 	}
     12 	else {
     13 		printf("\nInput %d is a odd number.", x);
     14 	}
     15 	return 0;
     16 }
© notamitgamer • Site Built: 2026-09-05 01:53:16 UTC • git-mirror commit: c170d72 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror