TGC Codebase Backup



Dark Calculator by Anonymous Coder

27th Apr 2005 6:18
Summary

A simple program for simple math actions.



Description



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    mainprog:
print "1. Add"
print "2. Subtract"
print "3. Multiply"
print "4. Divide"
print "5. Tax % Increase or Decrease"
print
print
input "What type of mathematical action do you want to use? Number: ";act#

if act#=1 then goto Addact
if act#=2 then goto Subtract
if act#=3 then goto Multiplyact
if act#=4 then goto Divideact
if act#=5 then goto TMPUNV

TMPUNV:
cls
print "Sorry, the tax % increase and decrease will not work until the next version comes out."
wait 2000
cls
goto mainprog

Addact:
cls
input "Type the number to be added with another one: ";addactnum1#
input "Type the second number to be added: ";addactnum2#
print
print "The result of this action is: ";addactnum1#;"+";addactnum2#;"=";addactnum1#+addactnum2#
wait 2000
print
print "Press any key to continue"
wait key
cls
goto mainprog

Subtract:
cls
input "Type the number to be subtracted with another one: ";subactnum1#
input "Type the second number to be subtracted: "; subactnum2#
print
print "The result of this action is: ";subactnum1#;"-";subactnum2#;"=";subactnum1#-subactnum2#
wait 2000
print
print "Press any key to continue"
wait key
cls
goto mainprog

Multiplyact:
cls
input "Type the number to be multiplied with another one: ";mulactnum1#
input "Type the second number to be multiplied: "; mulactnum2#
print
print "The result of this action is: ";mulactnum1#;"x";mulactnum2#;"=";mulactnum1#*mulactnum2#
wait key
print
print "Press any key to continue"
wait key
cls
goto mainprog

Divideact:
cls
input "Type the number to be divided with another one: ";divactnum1#
input "Type the second number to be divided: "; divactnum2#
print
print "The result of this action is: ";divactnum1#;"/";divactnum2#;"=";divactnum1#/divactnum2#
wait key
print
print "Press any key to continue"
wait key
cls
goto mainprog