Created
March 18, 2016 05:54
-
-
Save byronmejia/b2882c97a9b897ae2e26 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
X = 0 | |
Y = 0 | |
Z = 0 | |
C$ = " " | |
input "Enter first number: ", X | |
print "Input: ", X | |
input "Enter second number: ", Y | |
print "Input: ", Y | |
400 input "Enter command: [*, /, +, -]: ", C$ | |
print "Input: ", C$ | |
if (C$="*") or (C$="/") or (C$="+") or (C$="-") then goto 600 | |
print "Please enter an appropriate calculation" | |
goto 400 | |
600 print "Thank you" | |
if (C$="*") then goto 700 | |
if (C$="/") then goto 800 | |
if (C$="+") then goto 900 | |
if (C$="-") then goto 1000 | |
700 Z = X*Y | |
goto 1100 | |
800 Z = X/Y | |
goto 1100 | |
900 Z = C+Y | |
goto 1100 | |
1000 Z = C-Y | |
goto 1100 | |
1100 print "Coolies" | |
print "Ans: ", Z |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment