HistoryBasic is a very powerful language as a tool for the novice programmer. Basic allows for a wide range of applications, and it has many versions. However, as long as the emphasis is on the techniques of programming and problem solving, the specific syntax is easy to follow.Significant Language FeaturesBasic is a multi-platform language because many basic compilers use the same types of routines. Basic allows:
Areas of Application
and is therefore suitable for both the professional and non-professional.
Hello World Example program
This program prints the phrase "Hello World" infinitely.
Sample code
10 PRINT "Hello World!"
20 GOTO 10 Sample run
Hello World!
Hello World! Hello World! etc., etc.... Arithmetic Operations Example Program This program performs basic arithmetic operations.
Sample Code
10 INPUT "ENTER TWO NUMBERS SEPARATED BY A COMMA:
20 LET S = N1 + N2
30 LET D = N1 - N2
40 LET P = N1 * N2
50 LET Q = N1 / N2
60 PRINT "THE SUM IS ", S
70 PRINT "THE DIFFERENCE IS ", D
80 PRINT "THE PRODUCT IS ", P
90 PRINT "THE QUOTIENT IS ", Q
100 END
Sample RunENTER TWO NUMBERS SEPARATED BY A COMMA:
|