sine function in cpp

Solutions on MaxInterview for sine function in cpp by the best coders in the world

showing results for - "sine function in cpp"
Laura
03 May 2019
1/* sin example */
2#include <stdio.h>      /* printf */
3#include <math.h>       /* sin */
4
5#define PI 3.14159265
6
7int main ()
8{
9  double param, result;
10  param = 30.0;
11  result = sin (param*PI/180);
12  printf ("The sine of %f degrees is %f.\n", param, result );
13  return 0;
14}