Homework is due MOnday. actually i assigned 1 to cnt( counter)
cnt=1 before the while, i just forgot to write it