Advertisement
labib24

Untitled

Jan 13th, 2023
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. #include<stdio.h>
  2.  int main()
  3.  {
  4.      int a;
  5.      printf("Enter a number\n");
  6.      scanf("%d",&a);
  7.      if(a>0)
  8.      {
  9.          printf("%d is a positive number\n",a);
  10.      }
  11.      else if(a==0)
  12.      {
  13.          printf("non negative number\n",a);
  14.      }
  15.      else
  16.      {
  17.          printf("%d is a negative number\n",a);
  18.      }
  19.  }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement