I really hat dragging this out, but... I did fix the last line and it still dosn't work, this is really annoying me now so I'm going to post more of my (simple) code, dang it though; I wanted to figure it out myself, here's some more code:
Code:
#include <iostream>
#include <fstream>
#include <stdio.h>
#include <math.h>
using namespace std;
int main(int argc, char **argv);
do {
int a;
int c;
int b;
double q;
int p;
double f;
cout << "Please enter known leg: ";
cin >> a;
cout << "Please enter hypotanuse: ";
cin >> c;
q=(c*c)-(a*a);
p=(c*c);
f= sqrt(q);
cout << "The values you entered are " << a <<" " << c << ".\n ";
cout << " and it equals " << q << "= b^2 \n \n";
cout << "The missing leg is: " << f << " \n \n";
system ("pause");
} while (1==1);
return 0;
}
return 0;
}
what seems to be the problem? if there's a way you could point me in the right direction without giving it away that would be great!