i am not getiing exact value of sin 60 and cos 60.. i use function parameter by reference...

#include<iostream>

#include<math.h>

void GetSinCos(const double dx, double &dSin, double &dCos)

{

dSin=sin(dx);

dCos=cos(dx);}

int main()

{

GetSinCos(60,dSin,dCos);////This function takes one parameter (by value) as input, and “returns” two parameters (by reference) as output.///////cout<<"the sin is"<<dSin<<endl;

cout<<"the cos is"<<dCos<<endl;}

Don't trig functions usually want input in radians, not degrees?

thanks

Ask Your Question

Weekly Poll

Do you think Facebook should be allowed to move forward with the Libra currency?

Discuss in The Lounge

Poll History