I have forgotten
my Password

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttps://me.yahoo.com
Index » Programming » C/C++ »

odd number in c

kasi\′s Photo
4 Sep 08, 6:41AM
(2 replies)
odd number in c
how to find odd number in c language
john\′s Photo
4 Sep 08, 10:57AM
Try using the bitwise 'and' operator:
if(a&1) printf("Odd");
else printf("Even");
Tommy\′s Photo
21 Sep 08, 10:17AM
if(n % 2 == 0) printf("Even");
else printf("Odd");
Currently you need to be logged in to leave a message.