i was at e3 today (i know someone who works for ign). the half-life 2 presentations blew me away, but i was expecting that. doom3 looked pretty killer on xbox, can't wait to see that game on an...
Type: Posts; User: kashikoi
i was at e3 today (i know someone who works for ign). the half-life 2 presentations blew me away, but i was expecting that. doom3 looked pretty killer on xbox, can't wait to see that game on an...
the "-l" is a flag for the compiler telling it to link something. i'm guessing the "m" is for the math library.
try putting an "-lm" in "trial". example:
trial: test.o readinput.o...
are you using gcc or g++?
make sure to link the math lib too with "-lm". for example if your source file is test.c:
gcc test.c -lm
you are also declaring a local "answer" so your output will always be 1 (the value of answer local to main). remove the "int"s within that while loop and you should be fine.
you are declaring a local 'x' within that while loop.
number theory is great. so amazing that you can discover all sorts of complex patterns and theories from something as "simple" as numbers. and yes, calculus rocks.