Sunday, 7 August 2016

SIMPLE IF STATEMENT

#include <stdio.h>
int main ()
{
 int a = 10;  /* local variable definition */
 if( a < 20 )  /* check the boolean condition using if statement */
 {    /* if condition is true then print the following */
  printf("a is less than 20\n" );
 }
 printf("value of a is : %d\n", a);
 return 0;
}

OUTPUT :
a is less than 20
value of a is : 10

No comments:

Post a Comment

smhjifrivly@gmail.com