I am making a list of trig functions by increments of 10 degrees and I dont have a complier.
include <iostream.h>
#include <math.h>
void main
float degrees, Sin, Cos, Tan;
cout << "Enter a number of degrees: ";
cin >> degrees;
cos = cos(degrees*180/3.14);
cout << "Cosine: " << cosine << endl;
cout << "Sine: " << sin(degrees*180/3.14);
cout << "Tangent:" << tan(degrees*180/3.14);
do {
cout << "Enter degrees: ";
cin >> degrees;
cout << "Sin";
cin >> sin;
cout << "Cos";
cin >> Cos;
cout << "Tan";
cin >> Tan;
counter = degrees;
cout << setw( 10 ) << "Degrees"
<< setw ( 20 ) << "sine"
<< setw ( 20 ) << "cosine"
<< setw ( 20 ) << "Tangent"
<< "\n";
while( counter <= Sin, Cos, Tan)
{
cout << setw( 10 ) << degrees
<< setw ( 20 ) << sine, cosine, tangent
<< "\n";
counter = counter + 10;
}// end while
cout << "\nDo you want to do this again?(y/n) ";
}// end main
<< moderator edit: added code tags: [code][/code] >>
im hoping it looks likes this:
Degrees Sin Cos Tan
0 0 0 0
10