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");
}
}
0 comments:
Post a Comment