Linking GUI input with script

Sorry Im new to Unity and I need help urgently!! I have a problem when it comes to integrating the GUI functions and scripts together. For example, I have script in C# that is used to calculate the speed of and object using:

Speed = Distance / Time;

The result is then displayed on the interface.
I need to get users to input the distance through a GUI text box. How do I get the input and link it up with the equation I have in the script to produce a new answer?

I would appreciate it if anyone could help. Thanks!!

Read the docs’ Gui Scripting Guide! Text Area is what you’re looking for…

Thanks. I’ll try to figure it out. Still lost thou =)