Programming tutorial
C Tutorial 2 -If statements
The ability to control the flow of your program, letting it make decisions on what code to execute, is valuable to the programmer. The if statement allows you to control if a program enters a section of code or not based on whether a given condition is true or false. One of the important functions of the if statement is that it allows the program to select an action based upon the userâs input. For example, by using an if statement to check a user-entered password, your program can decide whether a user is allowed access to the program.
C Tutorial 2 -If statements