netx_iit

Check number is odd or even.

Jul 29th, 2020 (edited)
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. //Enter one number from user and check number is odd or even.
  2. #include<stdio.h>
  3. #include<conio.h>
  4. int main()
  5. {
  6.     int no1;
  7.     printf("\nEnter any no=");
  8.     scanf("%d",&no1);
  9.     if(no1%2==0)
  10.     {
  11.         printf("%d is even number",no1);
  12.     }
  13.     else
  14.     {
  15.         printf("%d is odd number",no1);
  16.     }
  17.     return 0;
  18. }
Add Comment
Please, Sign In to add comment