[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: sin

 Rahul Jindal molested the spacetime to project in our dimension:
> #include <math.h>
> main(int argc, char **argv)
> {
> printf("%d",sin(atoi(argv[1])));
> }
Try cc -lm sin.c -o sin
you need to give the -lm....8^)
also include stdio.h 
besides make that %d into %f and it would be nice if you returned from the
also the sin takes a double and returns a double make that atoi to atof or
better still strtod and be sure that you don't give a null to strtod as first
param also to don't forget to include stdlib.h if using strtod 
,and main returns int just in case ...8^)
And yeah man pages are useful 8^)


   "That's the problem with nature, something's always stinging you
   or oozing mucous all over you. Let's go and watch TV."
              --- Calvin