Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- eine Taschenrechner-Anwendung für Android
- io.write ("Was möchtest du rechnen?: ")
- x = io.read ()
- print (" ")
- io.write ("Zahl 1: ")
- a = io.read ()
- a = a+0
- print (" ")
- io.write ("Zahl 2: ")
- b = io.read ()
- b = b+0
- print (" ")
- if x == "+" then
- e = a+b
- print ("dein Ergebnis: ", e)
- end
- if x == "-" then
- e = a-b
- print ("dein Ergebnis: ", e)
- end
- if x == "×" then
- e = a*b
- print ("dein Ergebnis: ", e)
- end
- if x == "÷" then
- e = a/b
- print ("dein Ergebnis: ", e)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement