rabbinur

Odd/Even

Aug 2nd, 2012
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. #include<conio.h>
  4.  
  5. void main()
  6. {
  7.    int n;
  8.    system("cls");
  9.   {
  10.    printf("Enter an integer\n");
  11.  
  12.    scanf("%d",&n);
  13.   }
  14.   if(n%2 == 0)
  15.   {
  16.    printf("Even number\n");
  17.   }
  18.   else
  19.   {
  20.    printf("Odd number\n");
  21.   }
  22.    getch();
  23. }
Advertisement
Add Comment
Please, Sign In to add comment