Task2.c problems fixed