This is what I have so far
void TrigFunctions:: DrawSine(int degree)
{
int range=0;
int NumLines=16;
double CurrentStep;
//constants
const double sample=0.05;
const double PI=3.1415;
const int FIRSTSTEP=0.5;
//prompt your user for input.
cout << "Please input the range."<<endl;
cin >> range;
//Convert for degree to radians and assign current step a value
CurrentStep= FIRSTSTEP * PI/180;
//get sine values and display graph
for(int i=0;i < NumLines;i++)
{
for(int j =-180;j < 180;j++)
{
/* Compare the sin of the step value to the sin of the sine range value and print '*' if there is a match.
Otherwise, print a blank */
if(sin(CurrentS tep) == sin(j* PI/180))
{
cout <<"*"<<endl;
}
else
{
cout <<" ";
}
}
//Increment Current step
CurrentStep += FIRSTSTEP*PI/180;
}
}
void TrigFunctions:: DrawSine(int degree)
{
int range=0;
int NumLines=16;
double CurrentStep;
//constants
const double sample=0.05;
const double PI=3.1415;
const int FIRSTSTEP=0.5;
//prompt your user for input.
cout << "Please input the range."<<endl;
cin >> range;
//Convert for degree to radians and assign current step a value
CurrentStep= FIRSTSTEP * PI/180;
//get sine values and display graph
for(int i=0;i < NumLines;i++)
{
for(int j =-180;j < 180;j++)
{
/* Compare the sin of the step value to the sin of the sine range value and print '*' if there is a match.
Otherwise, print a blank */
if(sin(CurrentS tep) == sin(j* PI/180))
{
cout <<"*"<<endl;
}
else
{
cout <<" ";
}
}
//Increment Current step
CurrentStep += FIRSTSTEP*PI/180;
}
}
Comment