Conditional Statement

Conditional statements are features of programming languages that tell the computer to execute certain codes, provided certain conditions are met. In simple terms, Before executing certain lines of code, we can set certain conditions. Only if system is satisfying all those conditions then only we are allowing the system to execute that particular line of code. If that condition doesn't met system will simply skip that particular line of code.

Conditional statements are the main pillars of Decision Making. Decision making structures requires the programmer to specify one or more conditions to be evaluated or tested by the program, along with a statement or statements to be executed if the condition is determined to be true, and optionally, other statements to be executed if the condition is determined to be false. Conditional statements are used through the various programming languages to instruct the computer on the decision to make when given some conditions. These decisions are made if and only if the pre-stated conditions are either true or false, depending on the functions the programmer has in mind.