Slight error with infinity loop.
C program functionality complete.