TGC Codebase Backup



The Ultemalech Calculator by Lord Ultemalech

20th Jun 2004 10:40
Summary

A multi function calculator



Description

a 4 function calculator in 19 lines



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    Do
if store$ = ""
print "enter first number"
Input num1
endif
Print "enter second number"
input num2
Print "enter operater"
input op$
if op$ = "+" then ans = num1+num2
if op$ = "-" then ans = num1-num2
if op$ = "%" then ans = num1/num2
if op$ = "x" then ans = num1*num2
if op$ = "+" or op$ = "-" or  op$ = "%" or  op$ = "x" then print ans else print "SYNTAX ERROR"
print "type store to store the answer to num1"
input store$
num1 = ans
loop