Saturday, May 4, 2013

c programing

Hello friends today we will learn a new code.That is conditioner logic.It is so important and so easy.you have to write coding by condition.
try this code

#include <stdio.h>
int main()
{
      int n;
      n=10;
     if(n>=10) {
          printf("the number is positive\n");
          }
     else {
     printf("the number is negative\n");
     }
    return 0;
}

you can change code by giving n=0,-18-2,62,500.
N will find out n is positive or negative.you have to use if and else for conditioner logic.

No comments:

Post a Comment