I attempted to make a program that will use the sine and cosine of a number, but is seams that the #s were switched. Can anyone tell me if I did something wrong. Bellow is the code relevant to this.
#include <cmath>
I also tried using #include <math.h> but it did the same thing
double temp1;
double temp2
double angle
temp1 = cos(angle);
temp2 = sin(angle);
cout << temp1 << " " << temp 2;
I run it and I get for an angle of 20
cosine = 0,408082
sine = 0.912954
I plug it into a calculator and I get for the same angle
cosine = .939692
sine = 0.342020
_______
visit utb.zoomshare.com to read my different stories that I have written.
"If at first the idea is not absurd, there is no hope for it"
-Albert Einstein
---------------------------------
Never miss a thing. Make Yahoo your homepage. |