Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 111 - 2505_CoreGPT(Podar)_Flipbook_C6
P. 111

    Program 4: To demonstrate Nested If statement.

                            Restart

                          Decision making in BASIC-256 is done by conditional statements or decision-making
                          statements which decide the direction of the flow of program execution.
                          The GOTO statement is used to control the flow of a program by directing the program
                          to jump to a specific line number or label within the code.
                          The IF-THEN statement is the simplest conditional statement.

                          The Nested IF in BASIC-256 means placing one IF…THEN statement inside another.

                                                              Checkpoint

                     A.  Tick ( ) the correct option.

                        1.  Which type of statement is used for decision making?
                           a.  Loop statements                              b.  Control statements

                           c.  Input statements                             d.  Output statements

                        2.  Mark the correct syntax of IF-THEN statement.

                           a.  IF <condition> THEN                          b.  IF <condition> DO
                                   Statements to be executed                       Statements to be executed
                               END IF                                          END IF

                           c.  IF <condition> FOR                           d.  IF <condition> BEGIN
                                    Execute Statements                             Statements to be executed
                              END IF                                           END IF

                                                                                    More on BASIC-256 Statements        109

| 106 107 108 109 110 111 112 113 114 115 116 |