klodska

Untitled

Aug 14th, 2025
8
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. print("Введи число 1")
  2. n1 = io.read("*number")
  3. print("Введи число 2")
  4. n2 = io.read("*number")
  5. print("Введи операцию")
  6. print("1 - Сумма")
  7. print("2 - Вычитание")
  8. print("3 - Умножение")
  9. print("4 - Деление")
  10. type = io.read("*number")
  11. if type == 1 then
  12. print(n1 + n2)
  13. elseif type == 2 then
  14. print(n1 - n2)
  15. elseif type == 3 then
  16. print(n1 * n2)
  17. elseif type == 4 then
  18. print(n1 / n2)
  19. end
  20. print("Спасибо за использывание!")
Advertisement
Add Comment
Please, Sign In to add comment