Lua Program to add two numbers
Program
io.write('Enter value of a: ')
local a = io.read("*n")
io.write('Enter value of b: ')
local b = io.read("*n")
print('Sum: ', a + b)
Output
Enter value of a: 675
Enter value of b: 34
Sum: 709.0
Program
io.write('Enter value of a: ')
local a = io.read("*n")
io.write('Enter value of b: ')
local b = io.read("*n")
print('Sum: ', a + b)
Output
Enter value of a: 675
Enter value of b: 34
Sum: 709.0