--[[Write a program to store the kilograms in a variable and convert in to grams--]]
kg = io.read('*n')
g = kg*1000
print(kg, 'kilograms =', g, 'grams')

Embed on website

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