YAY!!!got it...stupid mistake. easy 5 dollars for cs majors......need help with 'C' programming

swimmersteve

Senior member
Jul 26, 2000
253
0
0
i've been working on this program for 2 hrs and i give up. 5 dollars paypal for the first person who writes this in 'C' for me.

Write C programs for the following: The function sin(x) can be approximated by summing the first n terms of the infinite seriessin(x) = x ? x3/3! + x5/5! ? x7/7! + ?where x is expressed in radians (Note: ð radians = 180o). Continue adding successive terms in the series until the value of the next term becomes smaller in magnitude than 0.00001 (10-5).

thank you.
forgot to add "#include math.h
 

sciencewhiz

Diamond Member
Jun 30, 2000
5,885
8
81
pretty good deal, you pay $5 and you don't have to do your homework.

I could probably write it and test it in an hour. Problem is, I make $20 an hour at my normal job, and my consulting fees are $50 an hour.
 

UncleWai

Diamond Member
Oct 23, 2001
5,701
68
91
You should just ask for help.
If people want to help you, they will help you.
Giving $5 sounds like an insult.
 

Noirish

Diamond Member
May 2, 2000
3,959
0
0
Yeah, dude, $5 is definitely an insult.
Here is a hint -> think recursive.
Oh yeah, that's $5 there.
 

kt

Diamond Member
Apr 1, 2000
6,032
1,348
136
what a d!ck.. how about I pay you $10 to do your own homework?
 

OulOat

Diamond Member
Aug 8, 2002
5,769
0
0
Originally posted by: orangel
Yeah, dude, $5 is definitely an insult.
Here is a hint -> think recursive.
Oh yeah, that's $5 there.

Doesn't even need to be recursive, although that is the way to go. A while loop increasing the power and factorial 2 each time with a binary counter switching on and off for the - and + should do. This is like 20 lines of code. 4 lines maybe in ocaml.
 

ed21x

Diamond Member
Oct 12, 2001
5,411
8
81
installing my copy of visual c++ now... i'm feeling particularly lazy today, so mind if I do it all in one function? oh, and no interface or crap like that, just launch it as a dos .exe file.