Arithmetic calculator. Scientific. by Anonymous Coder12th Aug 2004 10:58
|
---|
Summary An arithmetic scientific calculator. Description Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com cls print "" start: print "Generating scientific calculator..." sleep (3000): print "A. Addition B. Subtraction C. Multiplication D. Division" print "E. Square roots G. Exponents H. Sines " print "I. Cosines J. Tangents K. Arcsines L. Arccosines" print "M. Arctangents N. Hyperbolicsines O. Hyperboliccosines" print "P. Hyperbolictangents R. My meta " print "I am sorry, but DarkBasic can not privide: Secants," print "Radians, Cotangents, Arccotangents, Hyperboliccotangents," print "Cosecants, Arcsecants, Arccosecants, Hyperbolicsecants," print "Hyperboliccosecants, Minutes, Cominutes, Arcminutes," print "Arccominutes, Hyperbolicminutes, Hyperboliccominutes," print "Radians, Coradians, Arcradians, Arccoradians," print "Hyperbolicradians, Hyperboliccoradians, etc." do if inkey$()="A" then t1=1:exit if inkey$()="B" then t1=2:exit if inkey$()="C" then t1=3:exit if inkey$()="D" then t1=4:exit if inkey$()="E" then t2=1:gosub ON if inkey$()="G" then t2=3:gosub ON if inkey$()="H" then t2=4:gosub ON if inkey$()="I" then t2=5:gosub ON if inkey$()="J" then t2=6:gosub ON if inkey$()="K" then t2=7:gosub ON if inkey$()="L" then t2=8:gosub ON if inkey$()="M" then t2=9:gosub ON if inkey$()="N" then t2=10:gosub ON if inkey$()="O" then t2=11:gosub ON if inkey$()="P" then t2=12:gosub ON if inkey$()="R" print "Age: 8" print "Name: Joseph" print "Surname: Blair" print "I am the "Anonymous Coder" who created that simple mouse" print "positioning program. Press any key to continue." wait key cls print "" gosub start endif loop cls print "" print "Enter the first number>" input fn print "Enter the second number>" input sn if t1=1 then ans=fn+sn if t1=2 then ans=fn-sn if t1=3 then ans=fn*sn if t1=4 then ans=fn/sn if t2=2 for a=1 to sn fn=fn*fn next a ans=fn endif print "Answer: ",ans print "Press any key to continue." wait key cls 0 print "" gosub start ON: cls print "" print "Enter the first number>" input fn if t2=1 then ans=sqrt(fn) if t2=3 then ans=exp(fn) if t2=4 then ans=sin(fn) if t2=5 then ans=cos(fn) if t2=6 then ans=tan(fn) if t2=7 then ans=asin(fn) if t2=8 then ans=acos(fn) if t2=9 then ans=atan(fn) if t2=10 then ans=hsin(fn) if t2=11 then ans=hcos(fn) if t2=12 then ans=htan(fn) print "Answer: ",ans print "Press any key to continue." wait key cls 0 print "" gosub start |