Another Simple program so, this program will give you output whether number
you have entered is  positive or negative. 

 Program

  #include <stdio.h>
  #include <conio.h>
  void main()
  {
    int n;
    printf("Enter the number you want to check = ");
    scanf("%d",&n);
    if(n>0)
     {
       printf("%d is positive number",n);
      }
     else
      {
       printf("%d is negative number",n);
      }
    }

 Output:
 Output when if part is true.                                            Output when if part is False.
                                                     
                                                << Back

Post a Comment

Previous Post Next Post