Page 147 - Computer - 6
P. 147

To open a saved program:
            1.  On the Toolbar, click the Open       button in the
                File group.                                                                                      2

            2.  In the Open dialog box, select the program you
                want to open, and click the Open button.
                The selected program is opened and its code is

                displayed in the Editor window.
           To execute a program:

            1.  On the Toolbar, click the Run   button in the Program
                group, or press the F5 key.
                The output window opens and displays the output of
                the program.

            2.  Once  the  program  ends,  press  any  key  to  close  the
                output window.

           IntelliSense
           IntelliSense is a feature in Small Basic that offers you suggestions

           while writing code. As you type the first few characters of the code,
           the IntelliSense list pops up and offers suggestions. Press the UP
           and DOWN arrow keys to scroll through the list of options. Press
           the Enter key to insert the highlighted command into your program.

            Example 1: Write a program to accept the length of base and height of a triangle and display its area.
           (Area of a triangle = 0.5 × Base × Height)
            1.  Open a new program in Small Basic.

            2.  In the Editor Window, type the code as shown in the figure.













            3.  Click the Run button.
                The output window opens.

            4.  Enter the length of the base and height of the triangle.

           Example 2: Write a program to accept two numbers from the user and display the larger and the
           smaller number. The program should also display the remainder when the larger number is divided
           by the smaller number.



                                                                                                             145
   142   143   144   145   146   147   148   149   150   151   152