double rad (double angle);
double cosine (double angle);
double sine (double angle);
double tangent(double angle);
int main()
{
double angle,radian,degree,cos,sin,tan;
char res;
do
{
cout<<"***********TRIGNOMETRY PROGRAM**********\n";
cout<<"\n";
cout<<"\t -WELCOME TO THE PROGRAM-\n";
cout<<"\n";
cout<<"Please enter a angle value => ";
cin>>angle;
cout<<"\n";
cout<<"Is the angle in Degree or Radian?\n";
cout<<"\t Type D if it is in Degree\n";
cout<<"\t Type R if it is in Radian\n";
cout<<"Your response => ";
cin>>res;
cout<<"\n";
else
{
cout<<"Ooops, invalid response, try again!\n";
cout<<"\t Type D if it is in Degree\n";
cout<<"\t Type R if it is in Radian\n";
cout<<"Your response => ";
cin>>res;
}
cout<<"Do you want to continue?\n";
cout<<"\t Type Y to continue\n";
cout<<"\t Type any another key to stop\n";
cout<<"Your response => ";
cin>>res;
cout<<"\n";
}
while (res=='y' || res=='Y');
cout<<"Thank you, goodbye!!\n" ;
You gotta define your functions after the main() block. Finding the sine and the cosine of an an angle without using the <cmath> library is much more complicated. cos x = 1 - x^2/2! + x^3/3! - x^4/4! + .....-x^n/n!. You will need two functions for the formula above one for the exponent and one for the factorial....