Posts

A program to accept any number and display its multiplication table

Image
A program to accept any number and display its                          multiplication  table      CLS       LET C=0       INPUT "Enter any number", N       L:LET C=C+1      PRINT C*N     IF C<10 THEN GOTO L     END         You an copy this program and paste it in your Q basic editor.                   This is a preview of how the output screen will look like for displaying a  program to accept any number and display its multiplication  table.

Introduction to Commands in Q basic

Image
1 . Introduction to INPUT command in Q basic                         Used when the values of the variables are not known at the time of writing the program. Assign values to the variable through the keyboard at the time of execution.                               2 . Introduction to CLS command Is used to clear the output of the  previous screen. 3 . Introduction to  PRINT command Is used to display results and messages. eg. PRINT" Introduction to Commands in Q basic" 4 . Introduction to LET command Is used to store data data in computer's memory. eg. LET C=1 C is the variable in which the data is stored. 5. Introduction to GOTO command Allows to jump from present line to any other line.

Q BASIC program to display the sum of first 5 odd numbers

A program to display the sum of first 5 odd numbers          CLS             LET C=1           PRINT C           LET A= A+C           L:LET C =C+2          LET A= A+ C          PRINT C         IF C<9 THEN GOTO L         PRINT "SUM=", A         END