这是代码
#include <iostream>
#include <cmath>
int main()
{
float c, d;
for(int a = 1; a < 1000; ++a) {
for(int b = 1; b < 1000; ++b) {
c = (a*a) + (b*b);
c = sqrt(c);
d = a + b + c;
if(d==1000) {
std::cout << a << "," << b << "," << c << std::endl;
break;
}
}
}
system("pause");
return 0;
}
无法在我的系统Dev-C++ 4.9.9.0上运行它。
但是当在在线编译器中尝试它时,它给出了输出,但输出如下:
200,375,425
375,200,425
Disallowed system call: SYS_fork