google-site-verification: googlef8aa845b858144d3.html COMPUTER SCIENCE NOTES: Even Odd: (Example 5) Write a program to check whether the given number ...

Thursday, March 2, 2017

Even Odd: (Example 5) Write a program to check whether the given number ...

  1. /* 5 program of even and odd number */
  2. #include<stdio.h>
  3. #include<conio.h>
  4. void main()
  5. {
  6. int n,quotient;
  7. clrscr();
  8. printf("Enter a number :");
  9. scanf("%d",&n);
  10. quotient=n/2;
  11. if(quotient*2==n)
  12. printf("even number ");
  13. else
  14. printf("odd number");
  15. getch();
  16. }

No comments:

Post a Comment