Here's an example (but it has errors) for cosine:
http://www.cplusplus.com/forum/beginner/80317/
Since the above was written by a beginner, you might want to ignore it and write your own code from scratch, but it should give an idea.
Basically, you find the sum of the first several terms of a series.Each term can be derived from the previous one using multiplication and division.
From this reference, you can see the series:
http://en.wikipedia.org/wiki/Taylor_series#List_of_Maclaurin_series_of_some_common_functions
sin(x) = x - x^3/3! + x^5/5! ...
where x is in radians.
As long as x is small, the terms fairly quickly become smaller.
The sign of each term alternates, plus, minus, plus, minus ....
numerator is
x
x*x*x
x*x*x*x*x
x*x*x*x*x*x*x
denominator is a factorial, that is
1
1*2*3
1*2*3*4*5
1*2*3*4*5*6*7
etc
so you find each term from the previous one, rather than doing the whole thing from scratch each time.
first term = x
Next term = first term * (-1) * (x*x) / (2 * 3)
Next term = 2nd term * (-1) * (x*x) / (4 * 5)
and so on.
The only real problem is knowing when to stop. You can take a fairly pragmatic approach here, simply use a fixed number of terms to begin with. Or you could compare the size of the latest term with the total so far, to see whether it is too small to matter (since a float or double has a limited precision).
Hope this helps a bit, if you need more help, just ask.