## My BASIC program examples

On this page I placed my few programs written in BASIC. If you do not have got a old computer (such as Commodore 64), use this emulator to test BASIC programs.

## Fibonacci sequence

`10 LET A=1`

20 LET B=1

30 PRINT A

40 PRINT B

50 LET A=A+B

60 PRINT A

70 LET B=B+A

80 PRINT B

90 IF B<50 GOTO 50

## Square root finder

`10 INPUT A`

20 LET N=1

30 IF N*N=A GOTO 60

40 LET N=N+1

50 GOTO 30

60 PRINT N

## List square numbers

`10 LET A=1`

20 PRINT A*A

30 LET A=A+1

40 IF A<11 GOTO 20

## HiLo guessing game

`10 LET N=42`

20 INPUT G

30 IF G<N PRINT 10

40 IF G>N PRINT 20

50 IF G=N GOTO 70

60 GOTO 20

70 PRINT 30

10 means too low, 20 means too high, 30 means "You win".

Updated 11th November 2020

*Copyright © 2020 Manna5*