Calculate cosine: how to use cos
![Calculate cosine: how to use cos](http://www.java2s.com/Code/CImages/Calculatecosinehowtousecos.PNG)
#include <stdio.h>
#include <math.h>
#define PI 3.14159265
int main ()
{
double p, result;
p = 45;
result = cos ( p * PI / 180);
printf ("Cosine of %lf degrees is %lf\n", p, result );
return 0;
}
Related examples in the same category