I want to test the code i wrote which is part of my assignment
double sine(double x, double tolerance, int & limit)
{
int a = 1;
double b = x;
double z(0.0);
do {
b=(-z*x*x)/((2*a)*(2*a+1));
z=b;
z+=1;}
while(fabs(b-z)>tolerance);
limit= a;
return b;
}
im supposed to use a main() to test if the code works and im not sure how to do this
I would like a push in the right direction cause im stuck