Howdy,
I don't think anyone can really just give you the code that will work -- it depends on how your robot is set up and where all your motors are and so on. I also think it's important that you work on this project yourself (it sounds like homework, or something for a robot competition, and it sounds like a great learning experience!)
However, have you tried googling "Arduino code for line following robot" yet? ;-) That might set you on the right path...
MIKE