BASIC


BASIC (an acronym for Beginner’s All-purpose Symbolic Instruction Code) is a computer procedure-oriented programming language designed by John Kemeny and Thomas Kurtz in the 1960s to be easily learned by anyone. Over the years, various companies made their own proprietary versions and included them in their computers (and Texas Instruments made their own version, TI-BASIC, which is included in some of their calculators). Microsoft’s Visual Basic is the programming language of choice for in-house programming at small businesses. But in mathematics and physics, BASIC is little used outside of the classroom.

The following BASIC program takes two integers as inputs and outputs their greatest common divisorMathworldPlanetmathPlanetmath using Euclid’s algorithm:

100 REM Program Greatest Common Divisor Using Euclidean algorithmMathworldPlanetmath
110 INPUT "Please enter a positive integer A"; A
115 INPUT "Please enter a positive integer B"; B
120 WHILE B > 0
121 TEMPA = B
122 A = B
123 B = TEMPA MOD B
124 WEND
130 PRINT "The GCD is "; A
140 END

Title BASIC
Canonical name BASIC
Date of creation 2013-03-22 16:47:18
Last modified on 2013-03-22 16:47:18
Owner PrimeFan (13766)
Last modified by PrimeFan (13766)
Numerical id 8
Author PrimeFan (13766)
Entry type Definition
Classification msc 68N15
Synonym Beginner’s All-purpose Symbolic Instruction Code