Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --VARIABLES
- local length = ""
- local width = ""
- local answer = ""
- local correct = "y"
- local x = 1
- -- Functions
- function dim()
- term.write("How long is bridge? :")
- length = read()
- term.write("How wide is bridge? :")
- width = read()
- print("These are the dimensions of the Bridge:")
- print("Length = "..length)
- print("Width = "..width)
- print("Shall I proceed? : y/n")
- answer = read()
- return length, width, answer
- End
- --Main Program
- dim()
- while answer ~=correct do
- if answer == correct then
- print ("Awesome!! Let's build!!")
- else
- print ("Well, then I'm not sure what to do let's start over.")
- dim()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment