using if else control instructions || C programming examples

using if else control instructions || C programming examples

#include <stdio.h>
 
main()
{
   int x = 2;
 
   if ( x == 2 )
      printf("x is equal to two.\n");
   else
      printf("For comparison use == as = is the assignment operator.");
 
   return 0;
}

Output:
x is equal to two.
Share this Post Share to Facebook Share to Twitter Email This Pin This Share on Google Plus Share on Tumblr join on whatsapp

    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment