mirror of
https://github.com/QB64Official/qb64.git
synced 2024-08-22 09:05:08 +00:00
53 lines
756 B
QBasic
53 lines
756 B
QBasic
5 CLS
|
|
PRINT "1) ADD"
|
|
PRINT "2) MULTIPLY"
|
|
PRINT "3) DIVIDE"
|
|
PRINT "4) SQUARE ROOT"
|
|
PRINT "5) EXIT"
|
|
INPUT I
|
|
IF I = 1 GOTO 10
|
|
IF I = 2 GOTO 20
|
|
IF I = 3 GOTO 30
|
|
IF I = 4 GOTO 40
|
|
IF I = 5 GOTO 50
|
|
END
|
|
10 CLS : PRINT "INPUT NUMBER"
|
|
INPUT A
|
|
CLS
|
|
PRINT "INPUT NEXT NUMBER"
|
|
INPUT B
|
|
CLS
|
|
PRINT A + B
|
|
PRINT "PRESS SPACE TO RUN"
|
|
SLEEP 0
|
|
GOTO 5
|
|
20 CLS : PRINT "INPUT NUMBER"
|
|
INPUT C
|
|
CLS
|
|
PRINT "INPUT NEXT NUMBER"
|
|
INPUT D
|
|
CLS
|
|
PRINT C * D
|
|
PRINT "PRESS SPACE TO RUN"
|
|
SLEEP 0
|
|
GOTO 5
|
|
30 CLS : PRINT "INPUT NUMBER"
|
|
INPUT E
|
|
CLS
|
|
PRINT "INPUT NEXT NUMBER"
|
|
INPUT F
|
|
CLS
|
|
PRINT E / F
|
|
PRINT "PRESS SPACE TO RUN"
|
|
SLEEP 0
|
|
GOTO 5
|
|
40 CLS : PRINT "INPUT NUMBER"
|
|
INPUT G
|
|
CLS
|
|
PRINT SQR(G)
|
|
PRINT "PRESS SPACE TO RUN"
|
|
SLEEP 0
|
|
GOTO 5
|
|
50 END
|
|
|
|
|