QBASIC
QBASIC
BASIC(Beginner's All-purpose Symbolic Code) was introduce in 1964 at Dartmouth College. BASIC was
introduced by mathematicians callef John George Kemeny and Tom Kurtzas. Using common English to
perform processor task languages such as FORTRAN and Assembly in 1985. Microsoft release their
verssion of Basic called QBASIC with MS DOS 5.0 operating system.
· Code. (QBASIC)
QBASIC consists of 2 basic files QBASIC.EXE and QBASIC.HLP for editing, debugging and executing
programs
FEATURES
1. QBASIC is simple and easy to learn.
6. It is user friendly
Data is a collection of facts and figures that are entered into a computer through a keyboard.
Data is of 2 types:
VARIABLES
A variable, simply defined, is a names which can contain a value.
Programming involving giving values to these names and presenting them in some form to the user. A
variable has a type which is defined by the kind of value it holds. If the variable holds a number , it may
be of integer, floating decimal, long integer and imaginary. Here are some example of values a variable
might contain:
Integer - 5
Long - 92883
Single - 39.2932
Double - 9283288.18
The field is a string. String contain a text. The last four are number types. QBASIC has a set of symbols
which represent each variable type
$ for string
% for integer
! for single
# for double
CLS
PRINT "This text will appear on the screen": displays the final output of the programme
END
This first statement cls stands for clear screen. It erases whatever was on the screen before it was
executed. PRINT simply displays its argument to the screen at the current text cursor location. The
argument in this case, is the text enclosed in quotes.
EXAMPE 2
CLS
INPUT "How old are you? ",age PRINT so, ";yourName$;" you are ";age%years old. That's interesting".
END