c tutorial, i/o, loops and functions