Example of nested if statement, COBOL Programming

Example of Nested if statement:

Illustration:

Consider the following sentence

863_nested if elese statement.png

The nested IF sentence holds two IFs and one ELSE. The IF-ELSE couple has been marked by the number 1 within a circle. The IF marked with 2 within the circle is alone IF without any ELSE. Now it can be simply seen that the above sentence is equal to the following flow chart.

695_nested if elese statement1.png

 

Posted Date: 10/17/2012 2:05:54 AM | Location : United States







Related Discussions:- Example of nested if statement, Assignment Help, Ask Question on Example of nested if statement, Get Answer, Expert's Help, Example of nested if statement Discussions

Write discussion on Example of nested if statement
Your posts are moderated
Related Questions
CLASS CONDITION:   The class condition establishes whether or not the value of the operand is numeric or alphabetic. The operand is numeric if it contains only the digits 0 t

Second form of Divide verb: The second form of this verb is as shown below: In this situation the identifier-1 or numeric- literal-1 will be divided by identifier-2 or

IF STATEMENT: The easiest form of the IF statement is  IF condition-1 statement-1 where the condition-1 may be any one from the shown below. When the condition-1

Rules for apply for the condition name: The rules below apply for the condition name. (i) The Condition names should be explained at level 88. The level number starts in ma

PROGRAM FOR DIVIDE VERB:   We have to write an easy program to elaborate DIVIDE verb. You can also use edit characters in the program. Identification division. Program-

File Activity: The file activity is a measure of the proportion of records processed during an update run. Therefore we define the activity ration as shown below. Activi

Illustration of if- else statement: IF OK-BALANCE NEXT SENTENCE ELSE MOVE 2 BALANCE-CODE In this illustration, the OK-BALANCE is a condition name. No action is specific if

Group Item as Operand in the Relational Condition: Whenever an operand of a relational condition is the group item, the item is then considered to be an alphanumeric field. Th

calculate simple interest

Program for Sequential File Creation & Rewriting  We have to write a program to create a Length file with just two fields: l (Length) and l-c (Length-Code). Add a few records.