User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







c:control_structures:if

if

#include <stdio.h> /* including standard library */
//#include <windows.h> /* uncomment this for Windows */
 
    if ( condition == true ){
    command;    
    }

C Sourcecode Example

#include <stdio.h> /* including standard library */
//#include <windows.h> /* uncomment this for Windows */
 
 
int main( void )
{
  int i;
 
  for (i=0;i<=99;i++){
    if (i==42) {
        printf("I have found the answer: %i\n",i);
    }
}
 
return 0;
}
  output:
  user@host:~$ ./if 
  I have found a answer: 42
advertising
c/control_structures/if.txt · Last modified: 2013/01/22 22:02 (external edit)

Impressum Datenschutz