Breaking News

Check given number is even or not in c

  1. #include<stdio.h>
  2. #include<conio.h>
  3. void main()
  4. {
  5. int n;
  6. clrscr();
  7. printf("enter the no");
  8. scanf("%d",&n);
  9. if(n%2==0)
  10. {
  11. printf("no is even");
  12. }
  13. else
  14. {
  15. printf("no is odd");
  16. }
  17. getch();
  18. }

No comments