Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print('My super calculator')
- print('Ruslan Isaev 2016')
- function loop()
- print('first number')
- first=io.read()
- print('second number')
- second=io.read()
- print('What to do with them')
- op=io.read()
- print('RESULT:')
- if(op=='+') then
- print(first+second)
- end
- if(op=='-') then
- print(first-second)
- end
- if(op=='*') then
- print(first*second)
- end
- if(op=='/') then
- print(first/second)
- end
- if(op=='^') then
- print(first^second)
- end
- loop()--When function ended do it again
- end
- loop()--At start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement