Posts

Showing posts with the label Decision making statements

Control Structures

Image
Control Structures are just a way to specify the flow of control in programs. Any algorithm or program can be more clear and understood if they use self-contained modules called logic or control structures. It basically analyzes and chooses in which direction a program flows based on certain parameters or conditions. There are three basic types of logic, or flow of control, known as: Decision Making Statements Loops Control Statements DECISION-MAKING STATEMENTS Decision-making is the anticipation of conditions occurring while execution of the program and specifying actions taken according to the conditions. As the name implies, decision-making allows us to run a particular block of code for a particular decision. Decision structures evaluate multiple expressions which produce TRUE or FALSE as outcomes. You need to determine which action to take and which statements to execute if the outcome is TRUE or FALSE otherwise. Here, the decisions are made on the validity of the particular condi...