Switched to C, input functioning correctly (will take from standard input or command line argument)