**BASIC**

This

**programming language**may be used to instruct a computer to perform a task.

Execution method: | Interpreted |
---|---|

Lang tag(s): | basic, qbasic, freebasic, thinbasic |

See Also: |

**Your Help Needed**

If you know

**BASIC**, please write code for some of the tasks not implemented in

**BASIC**.

**BASIC** is the *Beginner's All-purpose Symbolic Instruction Code*. John G. Kemeny and Thomas E. Kurtz invented BASIC at Dartmouth College during 1963 and 1964. (Their implementation evolved into True BASIC.)

BASIC became popular, with many different implementations for various computers. As the decades passed, the many dialects of BASIC diverged from the original language. Though an ANSI standard exists for BASIC, it is irrelevant to most BASIC programmers, who only target one implementation of BASIC.

Category:BASIC Implementations lists the many implementations of BASIC in Rosetta Code.

## Links[edit]

## Subcategories

This category has the following 4 subcategories, out of 4 total.

## Pages in category "BASIC"

The following 373 pages are in this category, out of 373 total.

### 2

### A

- A+B
- ABC problem
- ABC words
- Abstract type
- Abundant, deficient and perfect number classifications
- Ackermann function
- Additive primes
- Address of a variable
- Align columns
- Almost prime
- Animate a pendulum
- Anti-primes
- Archimedean spiral
- Arithmetic-geometric mean
- Arithmetic/Complex
- Arithmetic/Integer
- Array concatenation
- Array length
- Arrays
- Attractive numbers
- Averages/Arithmetic mean
- Averages/Median
- Averages/Root mean square

### B

### C

- Cantor set
- Case-sensitivity of identifiers
- Catalan numbers
- Chaos game
- Character codes
- Chebyshev coefficients
- Check that file exists
- Checksumcolor
- Chess player
- Classes
- Code segment unload
- Color of a screen pixel
- Colour bars/Display
- Command-line arguments
- Comments
- Compile-time calculation
- Compound data type
- Concatenate two primes is also prime
- Conditional structures
- Constrained random points on a circle
- Convert seconds to compound duration
- Conway's Game of Life
- Coprimes
- Copy a string
- Count in octal
- Count occurrences of a substring
- Cousin primes
- Create a file
- Create a two-dimensional array at runtime
- CSV data manipulation

### D

- Damm algorithm
- Date format
- Day of the week
- Day of the week of Christmas and New Year
- De Bruijn sequences
- Delete a file
- Department numbers
- Detect division by zero
- Determine if a string has all the same characters
- Determine if a string is collapsible
- Determine if a string is numeric
- Determine if a string is squeezable
- Dice game probabilities
- Digit fifth powers
- Digital root
- Dinesman's multiple-dwelling problem
- Discordian date
- Doomsday rule
- Dot product
- Dragon curve
- Draw a clock
- Draw a sphere
- Dynamic variable names

### E

### F

- Factorial
- Factors of an integer
- Fibonacci sequence
- File extension is in extensions list
- File input/output
- Find Chess960 starting position identifier
- Find common directory path
- Find first missing positive
- Find limit of recursion
- Find prime n such that reversed n is also prime
- Find squares n where n+1 is prime
- Find the intersection of two lines
- Find words which contains all the vowels
- Finite state machine
- FizzBuzz
- FizzBuzz/Basic
- Flipping bits game
- Floyd's triangle
- Forest fire
- Four bit adder
- Fractal tree
- Frobenius numbers
- Function definition

### G

### H

### I

### K

### L

- Largest prime factor
- Largest proper divisor of n
- Leap year
- Least common multiple
- Length of an arc between two angles
- Leonardo numbers
- Literals/Integer
- Literals/String
- Logical operations
- Long multiplication
- Longest common subsequence
- Longest string challenge
- Look-and-say sequence
- Loops/Break
- Loops/Continue
- Loops/Do-while
- Loops/Downward for
- Loops/For
- Loops/For with a specified step
- Loops/Foreach
- Loops/Infinite
- Loops/N plus one half
- Loops/Nested
- Loops/While
- Lychrel numbers

### M

- Magic 8-ball
- Magic squares of odd order
- Mandelbrot set
- Map range
- Matrix multiplication
- Matrix transposition
- Mayan numerals
- Maze generation
- McNuggets problem
- Menu
- Mersenne primes
- Mertens function
- Middle three digits
- Minimum number of cells after, before, above and below NxN squares
- Monte Carlo methods
- Monty Hall problem
- Morse code
- Multiplication tables
- Munchausen numbers
- Mutual recursion

### N

- N'th
- Naming conventions
- Nice primes
- Nth root
- Null object
- Number names
- Number reversal game
- Numbers divisible by their individual digits, but not by the product of their digits.
- Numbers in base 10 that are palindromic in bases 2, 4, and 16
- Numbers in base-16 representation that cannot be written with decimal digits
- Numbers which binary and ternary digit sum are prime
- Numbers whose count of divisors is prime
- Numerical integration

### O

### P

- Palindrome dates
- Palindrome detection
- Pangram checker
- Pascal matrix generation
- Pascal's triangle
- Penney's game
- Perfect numbers
- Perfect totient numbers
- Pi
- Pick random element
- Piprimes
- Playing cards
- Polymorphism
- Pragmatic directives
- Price fraction
- Primality by trial division
- Primes whose sum of digits is 25
- Primes with digits in nondecreasing order
- Product of divisors
- Program name
- Program termination

### Q

### R

- Random number generator (included)
- Random numbers
- Ranking methods
- Read a configuration file
- Read a file line by line
- Read entire file
- Real constants and functions
- Recaman's sequence
- Remove lines from a file
- Rename a file
- Rep-string
- Return multiple values
- Reverse a string
- Rock-paper-scissors
- Roman numerals/Encode
- Roots of unity
- Rot-13
- Run as a daemon or service
- Run-length encoding
- Runge-Kutta method
- Runtime evaluation

### S

- Scope modifiers
- Scope/Function names and labels
- Search a list
- SEDOLs
- Self-describing numbers
- Sequence of non-squares
- Shell one-liner
- Show ASCII table
- Sierpinski triangle
- Sierpinski triangle/Graphical
- Sieve of Eratosthenes
- Simulate input/Keyboard
- Sleep
- Sleeping Beauty problem
- Smallest square that begins with n
- Smith numbers
- Snake
- Snake and Ladder
- Solve equations with substitution method
- Sorting algorithms/Bubble sort
- Sorting algorithms/Gnome sort
- Sorting algorithms/Insertion sort
- Sorting algorithms/Pancake sort
- Sorting algorithms/Quicksort
- Sorting algorithms/Selection sort
- Sorting algorithms/Stooge sort
- Special characters
- Special Divisors
- Square but not cube
- Stack traces
- Stair-climbing puzzle
- Stern-Brocot sequence
- Stirling numbers of the second kind
- Strange numbers
- String append
- String case
- String comparison
- String concatenation
- String length
- String matching
- String prepend
- Strip a set of characters from a string
- Strip control codes and extended characters from a string
- Strip whitespace from a string/Top and tail
- Subleq
- Substring
- Substring/Top and tail
- Sum and product of an array
- Sum digits of an integer
- Sum multiples of 3 and 5
- Sum of a series
- Sum of divisors
- Sum of elements below main diagonal of matrix
- Sum of first n cubes
- Sum of squares
- Sum of the digits of n is substring of n
- Summation of primes
- Sylvester's sequence
- System time

### T

- Take notes on the command line
- Tau function
- Tau number
- Temperature conversion
- Terminal control/Clear the screen
- Terminal control/Coloured text
- Terminal control/Cursor movement
- Terminal control/Cursor positioning
- Terminal control/Display an extended character
- Terminal control/Hiding the cursor
- Terminal control/Inverse video
- Terminal control/Positional read
- Terminal control/Ringing the terminal bell
- The Twelve Days of Christmas
- Thue-Morse
- Tic-tac-toe
- Time a function
- Tokenize a string
- Towers of Hanoi
- Trigonometric functions
- Triplet of three numbers
- Truncate a file
- Truth table
- Two identical strings