
/* use pointers and compute sin and cos using functions*/

#include <stdio.h>
#include <math.h>
#define pi 3.12

void find_sine_cos(double,double *, double *);

main()
{

  double ang_rad,a_sin,a_cos;
  int    ang;

  printf("Enter the angle:");
  scanf("%d",&ang);

  ang_rad = ang*pi/180.0;

  find_sine_cos(ang_rad,&a_sin,&a_cos);

  printf("The sin and cos values are %6.2f %6.2f\n",a_sin,a_cos);

}

void find_sine_cos(double ar, double *as1, double *ac1)
{

*as1 = sin(ar);
*ac1 = cos(ar);

}

