SHARE
TWEET

Untitled

a guest Sep 11th, 2019 102 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. print "Welcome to the greatest calculator known to man!"
  2. print
  3. input "Enter your age: ";age
  4. [RETURN]
  5. if age < 18 then
  6.     print "We don't like your type..."
  7. else
  8.     print
  9.     print "Congratulations, you are old enough to use c a l c u l a t o r"
  10.     print
  11.     print "(1) Addition"
  12.     print "(2) Subtraction"
  13.     print "(3) Multiplication"
  14.     print "(4) Division"
  15.     input "Please select mathematical operation: ";operation
  16. end if
  17.  
  18. if operation = 1 then
  19.     print
  20.     print "Welcome to the addition calculator!"
  21.     print
  22.     input "Enter your first number: ";first
  23.     input "Enter your second number: ";second
  24.     print
  25.     print "The solution to your equation is ";first+second;"!"
  26.     print
  27.     input "Would you like to try another math problem? ";try$
  28.         if try$ = "yes" then
  29.             goto [RETURN]
  30.         else
  31.             print "why the hell not?"
  32.         end if
  33. end if
  34.  
  35. if operation = 2 then
  36.     print
  37.     print "Welcome to the subtraction calculator!"
  38.     print "Keep in mind that the format is (first number) - (second number)"
  39.     print
  40.     input "Enter your first number: ";first
  41.     input "Enter your second number: ";second
  42.     print
  43.     print "The solution to your equation is ";first-second;"!"
  44.     print
  45.     input "Would you like to try another math problem? ";try$
  46.         if try$ = "yes" then
  47.             goto [RETURN]
  48.         else
  49.             print "why the hell not?"
  50.         end if
  51. end if
  52.  
  53. if operation = 3 then
  54.     print
  55.     print "Welcome to the multiplication calculator!"
  56.     print
  57.     input "Enter your first number: ";first
  58.     input "Enter your second number: ";second
  59.     print
  60.     print "The solution to your equation is ";first*second;"!"
  61.     print
  62.     input "Would you like to try another math problem? ";try$
  63.         if try$ = "yes" then
  64.             goto [RETURN]
  65.         else
  66.             print "why the hell not?"
  67.         end if
  68. end if
  69.  
  70. if operation = 4 then
  71.     print
  72.     print "Welcome to the subtraction calculator!"
  73.     print "Keep in mind that the format is (first number) / (second number)"
  74.     print
  75.     input "Enter your first number: ";first
  76.     input "Enter your second number: ";second
  77.     print
  78.     print "The solution to your equation is ";first/second;"!"
  79.     print
  80.     input "Would you like to try another math problem? ";try$
  81.         if try$ = "yes" then
  82.             goto [RETURN]
  83.         else
  84.             print "why the hell not?"
  85.         end if
  86. end if
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top