1) Changed the cycle printing such that it prints the entire cycle from beginning and not in reverse order.
2) Handled a case for a cycle of length 1.
3) Changed the definition of functions such that they accept a FILE * to print in.