> Online tutorial : nestif
Showing posts with label nestif. Show all posts
Showing posts with label nestif. Show all posts


Nested IF and logic
Consider the following statements which decide upon the value of some variable i. Their purposes are exactly the same.
if ((i > 2) && (i < 4))
   {
   printf ("i is three");
   }

or:
if (i > 2)
   {
   if (i < 4)
      {
      printf ("i is three");
      }
   }