0% found this document useful (0 votes)
21 views2 pages

QBASIC

For qbasic learners

Uploaded by

jnroffs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views2 pages

QBASIC

For qbasic learners

Uploaded by

jnroffs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 2

Programming in 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.

Quick Beginners All Purpose Symbolic Instruction CODE

· 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.

2. It automatically checks syntax

3. It allows users to break lengthy programs into module.

4. Interprets a statement at a time to the CPU.

5. It is one of the most flexible languages

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:

STRING - "Hello, this is a string"

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 long

! for single

# for double

INTERACTING WITH THE COMPUTER


EXAMPLE 1

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 "What is your name?", yourName$

INPUT "How old are you? ",age PRINT so, ";yourName$;" you are ";age%years old. That's interesting".

END

You might also like