...using and indenter, this is what you have:
Code:
// Pythagorean Theorem //
// Brandon B //
// 09/04/05//
// This Program was designed to solve problems using the Pythagorean Theorem//
#include <iostream>
using namespace std;
#include <math.h>
int trigequation( int,int);
int subracttrig(int,int);
int main ()
{
int x;
cout<< " Solve for which leg?" << endl;
cout <<" 1 for C" << endl;
cout <<" 2 for A & B " << endl;
cin >> x;
if ( x == 1 )
{
int A, B, c,b2;
cout<< "Enter side A" << endl;
cin >> A;
cout <<" Enter side B"<< endl;
cin >>c;
B = trigequation (A,c);
b2 = sqrt(B);
cout << " size of the leg you entered is" <<""<< b2;
cout << c <<""<< "is the angle for side C" << endl;
system("pause");
return 0;
}
else if ( x == 2 )
{
int ax,be,c,d;
cout << "Enter number of side" << endl;
cin >> ax;
cout << " Enter number of Hypotenus" << endl;
cin >>be;
c = subracttrig(ax,be);
d = sqrt(c);
cout <<" The answer for the side you solved is" <<d << endl;
system("pause");
return 0;
}
int trigequation(int A, int c)
{
return(pow( A,2) + pow( c,2));
}
int subtracttrig(int ax, int be)
{
return(pow(be,2) - pow(ax,2));
}