C examples for math.h:sin
function
<cmath> <ctgmath> <math.h>
Returns the sine of an angle of x radians.
long double sinl (long double x); long double sin (long double x); double sin(double x); float sinf (float x); float sin (float x); double sin (T x);
Parameter | Description |
---|---|
x | Value representing an angle expressed in radians. |
Sine of x radians.
#include <stdio.h> #include <math.h> #define PI 3.14159265/* w w w .jav a2 s . co m*/ int main () { double param = 10.0; double result = sin (param*PI/180); printf ("The sine of %f degrees is %f.\n", param, result ); return 0; }