Problem 1 in C; 3 different solutions.