TGC Codebase Backup



Ultimate Calc 5.0 by Anonymous Coder

31st Jan 2005 20:43
Summary

The Password is 12345 The original program was made by The Nerd and this program was edited by The Geek!



Description

You can add, subtract, multiply, divide, find the area of rectangles, circles, and triangles. I plan on adding more to make Ultimate Calc 6.0



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    ` This code was downloaded from The Game Creators
` It is reproduced here with full permission
` http://www.thegamecreators.com

`´ calculating program
`´ Made by: The Nerd
`´ Edited by: The Geek
Print "The password is 12345"
wait 2000 
cls
Print "ULTIMATE CALC 5.0"
wait 1000
cls
print "This program was made by The Nerd"
wait 2000
cls
print "This program was edited by The Geek"
wait 2000
cls
Print "Please Note that PI is used as 3.14!"
wait 2000
cls
Print "Welcome."
print "Please press enter the type your Name"
suspend for key
cls
input ">";MainCh$
print "Hello, " ;MainCh$;", please type your password!"
pass:
input "Password : ", z
if z = 12345 then goto run
if else then goto wrong
wrong:
Print "Sorry that is not the right password!"
goto pass
run:
do
`´ fist i make an INPUT
input "would you like to do a area formula? 1=yes 2=no : ", i
IF i = 2 then goto reg01
if i = 1 then goto choice01
reg01:
input "Would you like to do a perimeter formula? 1=yes 2=no : ", ya
if ya = 2 then goto reg
if ya = 1 then goto reg02
reg02:
input "1=square, 2=circle, 3=rectangle, 4=triangle : ", yb
if yb = 1 then goto squarep
if yb = 2 then goto circlep
if yb = 3 then goto rectanglep
if yb = 4 then goto trianglep
squarep:
input " what is the length of one side? : ", yc
yd = yc + yc + yc + yc
goto squarepa
circlep:
input "What is the Diameter of the circle? : ", wa
wb = 3.14 * wa 
goto circlepa
rectanglep:
input "What is the length? : ", wd
input "What is the width? : ", we 
wf = wd + we + wd + we 
goto rectanglepa
trianglep:
input "What is side A's Length? : ", wg
input "What is side B's Length? : ", wh
input "What is side C's Length? : ", wi
wj = wg + wh + wi
goto trianglepa
choice01:
input "1=circle, 2=rectangle, 3=triangle, 4=cylinder, 5=sphere, 6=cube, 7=square, : ", j
if j = 3 then goto triangle1
if j = 2 then goto rectangle1
if j = 4 then goto cylinder1
if j = 5 then goto sphere1
if j = 6 then goto cube1
if j = 7 then goto square1
area:
input "what is the radius? : ", k
goto circle
triangle1:
input "what is the base? : ", l
input "what is the height? : ", n
goto triangle
reg:
input "type first : ", a
input "type second : ", b
goto reg4
rectangle1:
input "what is the length? : ", o
input "what is the width? : ", p
q = o * p
goto rectangle2
cylinder1:
input "what is the top's radius? : ", xz
input "what is the height? : ", zz
zy = 2 * 3.14 * xz * xz + 2 * 3.14 * xz * zz
goto cylinder3
sphere1:
input "what is the radius? : ", zw
zv = 4 * 3.14 * zw * zw
goto sphere2
cube1:
input "what is the area of one surface? : ",za
zb = 6 * za * za
goto cube2
square1:
input "What is the length of one side? : ",zc
zd = zc * zc
goto square2 
`´ then the computer calculating....
squarepa:
print " The squares perimeter"
print yd
goto reg3
circlepa:
Print "The Circle perimeter"
print wb
goto reg3
rectanglepa:
print "The rectangles perimeter"
print wf
goto reg3
trianglepa:
print "The Triangle's area"
print wj
goto reg3
reg4:
c = a
d = b
e = a + b
f = a * b
g = a / b
h = a - b
goto reg2
if i = 1 then goto area
if j = 1 then goto circle
if j = 3 then goto triangle
triangle:
m = .5 * l * n
goto triangle2
rectangle2:
print "the area of a rectangle"
print q
goto reg3
cylinder3:
print "Cylinders Area"
print zy
goto reg3
circle:
l = k * k * 3.14
goto circle2
sphere2:
print "Area of a Sphere"
print zv
cube2:
Print "Area of a cube"
print zb
goto reg3
`´ display result on the screen
reg2:
print "sum"
print e
print "answer to a multiplication problem"
print f
print "answer to a division problem"
print g
print " answer to a subtraction problem"
print h
goto reg3
circle2:
print " Circles area"
print l
goto reg3
triangle2:
print " Triangle's area"
print m
square2:
print " Square's Area"
print zd
goto reg3
`´ display message
reg3:
input "Would you like to quit? Type 1=yes 2=no! : ", x
y = 1
n = 2
if x = 2 then goto CONTINUE
If x = 1 then goto mess
mess:
print "Goodbye, " ;MainCh$;", See yah Later!"
wait 2000
IF x = 1 THEN END 
IF ELSE THEN GOTO CONTINUE:
CONTINUE:
cls
loop
end
`´ close the program
wait key
end
`´ this is the program