--Write a lua program to swap two variables(use a dummy variable)
val1 = io.read("*n")
val2 = io.read("*n")
print("Value of val1=",val1,"Value of val2=",val2)
dummy = val1
val1 = val2
val2 = dummy
print("Value of val1=",val1,"Value of val2=",val2)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: