**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 409 pages are in this category, out of 409 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

- Calculating the value of e
- 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
- Compare length of two strings
- 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 factors
- Count in octal
- Count occurrences of a substring
- Cousin primes
- Create a file
- Create a two-dimensional array at runtime
- CSV data manipulation
- Cullen and Woodall numbers

### 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
- Disarium numbers
- 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 square difference
- Find squares n where n+1 is prime
- Find the intersection of two lines
- Find words which contains all the vowels
- Finite state machine
- First 9 prime Fibonacci number
- 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
- Long year
- 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 multiple of m where digital sum equals m
- Minimum number of cells after, before, above and below NxN squares
- Modular inverse
- Monte Carlo methods
- Monty Hall problem
- Morse code
- Multiplication tables
- Munchausen numbers
- Mutual recursion

### N

- N'th
- Naming conventions
- Neighbour primes
- Next special primes
- 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
- Primality by Wilson's theorem
- Prime triplets
- Primes whose sum of digits is 25
- Primes with digits in nondecreasing order
- Product of divisors
- Program name
- Program termination
- Proper divisors

### R

- Random number generator (included)
- Random numbers
- Ranking methods
- Read a configuration file
- Read a file line by line
- Read a specific line from a file
- Read entire file
- Real constants and functions
- Recaman's sequence
- Remove lines from a file
- Remove vowels from a string
- Rename a file
- Rep-string
- Repeat a 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

- Safe and Sophie Germain primes
- Scope modifiers
- Scope/Function names and labels
- Search a list
- SEDOLs
- Self-describing numbers
- Semiprime
- Sequence of non-squares
- Shell one-liner
- Shift list elements to left by 3
- 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
- Sort primes from list to a list
- 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
- Steady squares
- Stern-Brocot sequence
- Stirling numbers of the second kind
- Strange numbers
- Strange plus numbers
- String append
- String case
- String comparison
- String concatenation
- String interpolation (included)
- 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 primes
- 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
- Sum of two adjacent numbers are primes
- 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
- Trabb Pardo–Knuth algorithm
- Trigonometric functions
- Triplet of three numbers
- Truncate a file
- Truth table
- Two identical strings