There is a problem with using sqrt() and other math functions on SNOWBALL. Just including is not enough. If you encounter this, try using "-lm" on the command, linking the math library. Here's an example: [myacct123@gsuad.gsu.edu@snowball]$ gcc hmwk4_myacct123.c /tmp/cc9RiswK.o: In function `getDistance': hmwk4_jhill144.c:(.text+0x26d): undefined reference to `pow' hmwk4_jhill144.c:(.text+0x297): undefined reference to `pow' hmwk4_jhill144.c:(.text+0x2a1): undefined reference to `sqrt' collect2: error: ld returned 1 exit status [myacct123@gsuad.gsu.edu@snowball]$ gcc hmwk4_myacct123.c -lm Notice that the fix is not changing the C program, but changing the command to compile/link it. For more detail, here's a good place to start: https://stackoverflow.com/questions/5248919/undefined-reference-to-sqrt-or-other-mathematical-functions