ya i've already read that but still got stuck on this program.....
Code:
// This program calculates sin(x) and/or cos(x) of the value input by the user.
#include <iostream.h>
void main ()
{
char v,y;
float r,x,sin,cos;
int n;
cout<<"Enter value of 'x' "<<endl;
cin>>x;
cout<<endl;
cout<<"Value entered in degrees? Y/N " <<endl;
cin>>y;
cout<<endl;
if(y == 'Y') //converts x into radians if entered in degrees by the user
{ r = (x * 3.14159265)/180 ;
else r = x ;
}
cout<<"Enter 's' to calculate sin ---- Enter 'c' to calculate cos ---- Enter 'b' to calculate both"<<endl;
cout<<"Enter --- ";
cin>>v;
cout<<"Enter the number of terms to evaluate"<<endl;
cin>>n;
if(v=='s')
{
for (t = 0; t==n; t++)
{ sin = r - (r^3/3*1)
---got stuck at this point