rohidas

Hi I am Rohidas lande.I have teaching in C.D.jain college of commerce Shrirampur .I have Nine year in teaching Experience to teach various programming langauge,script languages,databases like Java,C,C++,php,python,html,css,javascript,mysql,oracle.

Check Number Is Positive or Negative.

                 BACK

 Question:-Write C Program to a Check Number Is Positive or    Negative.

    Answer :-

         #include<stdio.h>
          int main()
         {
            int a;
               printf("Enter The Number You Want To Check :\n");
                scanf("%d",&a);
 
               if(a<0)
             {
                  printf("Number Is Negative:\n");
               }
        else if(a>0)
             {
                    printf("Number Is Possitive:\n");
               }
       else
            {
             printf("You Enter Zero :\n");
               }
       return 0;

    }

Post a Comment

0 Comments