Sunday, June 6, 2021

Conditional control statements/selection control statements/decision control statement.

 Decion control statements:

When dealing with section statements,there are generally three versions:

1 one-way

2 two way

3 three way

One way decision statements do a perticular thing or they don't .

two way decision statement can do one think /do another.

Multi-way decision statements can do of many different thinks depending on the value of an expression.

1] if  [one way decision ]

One way decisions are handled with an if statements that either do some particular things. 

The decision is based on a text expression that evaluates to either true or false. 

If the test expression evaluates of true, 

The corresponding statements is executed; 

If the test expression evaluates to false,

Control goes to the next executable statement. 

Following syntax of one way decision statement:

Syntax=

        If [Expression ]

        {

            Statements;

        }


if else


No comments:

Post a Comment

Object Paradigm Oriented Programming in C++ / object oriented programming / History of C++/ paradiagram in c++/C devolop, Operating System, Unix operating system, Assembly language, popular in world, Programming language.

  Object Paradigm Oriented Programming  Two programmers, Brian Kernighan and Dennis Ritchie developed a new language called C, in 1972.  C l...