Having problem.... taylor

i this taylor series on my own, with friends helping, but I can't seem to make it work.. here the code... and I am not suppose 2 use cmath function..



#include<iostream>
#include<iomanip>
#include<cmath>
using namespace std;

int main()
{
bool finish = false;
double x;
char output;
char D;
char R;
double radian;
int counter = 1;
int c;
int factorial = 1; //factorial start from 1 to make sure 0! is covered
char Y;

while (!finish)
{
cout << "PLease Enter an angle value =>" ;
cin >> x;

cout << "Is the angle in Degree or Radian?" << endl;
cout << "Type D if it is a Degree" << endl;
cout << "Type R if it is a Radian" << endl;
cin >> output;

if(output == 'D' || output == 'd')
{
radian = x*(3.1415926535/180);
cout<< fixed << setprecision(7);
cout << x << "Degree =" << radian << "Radian" << endl;

}
else if(output == 'R' || output == 'r')
{
radian = x;
}

while sin()
{
x=fmod(x,M_PI*2);
float result = x;
float h = x;

int f = 100;
int t = -1;

for(int i=3 ; i<f ; i+=2,t=-t)
{
t = -h*x*x/(i*(i-1));
result += h;
};

return result;
cout << " " << sin << endl;
}


float cos_taylor(float x)
{
x=fmod(x,M_PI*2)
float result = 1;

int f = 20;// this is the limit of the function cos
int t = -1;// this is for the
float l =1;// this is for the loop

for(int i=2 ; i<f ; i+=2,t=-t)
{
l*=(x*x)/(i*(i-1));
result += t*l;
}

return result;
tan = sin/cos
cout << "RESULT" << endl;
cout << "=================================" << endl;
cout << "x =" << radian << " radian" << endl;
cout << "sin(x) =" << fixed << setprecision(7) << sin <<endl;
cout << "cos(x) =" <<fixed << setprecision(7) << cos <<endl;
cout << "tan(x) =" <<fixed << setprecision(7) << tan <<endl;
cout << "================================="<< endl;

cout << "Do You want to continue?" << endl;
cout << "\tType Y to continue"<< endl;
cout << "\tType any other key to stop"<< endl;
cin >> Y;
cout << "Your response =>" << Y << endl;
if ( Y == 'y' || Y == 'Y')
{
cout << " continue " << endl;

}
else if ( Y != 'y' || Y != 'Y')
{
cout << " Bye Bye :) " << endl;
finish == true;

}
}
}
}
So what exactly does "not working" entail?
What is that "problem" you're speaking of?
Also, read this:
http://www.cplusplus.com/forum/articles/16853/
Topic archived. No new replies allowed.