Search:

Type: Posts; User: quzah

Search: Search took 0.18 seconds.

  1. Replies
    15
    Views
    8,056

    The first if is not attached to the second,...

    The first if is not attached to the second, because there is no else tying them together. Which is fine, if that is really what you want to happen. The point of my posts is that you understand how to...
  2. Replies
    15
    Views
    8,056

    You have to think about what you want your...

    You have to think about what you want your program to do. Watch:
    if( x == 1 )
    printf( "x is one\n" );
    else
    if( x == 2 )
    printf( "x is two\n" );
    else
    printf( "x is not one or two\n"...
  3. Replies
    15
    Views
    8,056

    if ... will always run this if check if ... will...

    if ... will always run this if check
    if ... will always run this check
    else
    will only run if that was not trueCompare that with this:
    if ... always runs this if check
    else if ... only after...
Results 1 to 3 of 3