#include int main(){int a,b,c; int i = 0; for( c = 1; c = 33; ++ c ) for( b = 100; b = c; -- b )for( a = 100; a = b; -- a) { if( (a + b + c < 100) && ( (a * a * b * b) == ((a * a + b * b) * c * c) )++ i; } printf("符合条件的组数为:%d\n",i);
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/22 13:31:25
#include int main(){int a,b,c; int i = 0; for( c = 1; c = 33; ++ c ) for( b = 100; b = c; -- b )for( a = 100; a = b; -- a) { if( (a + b + c < 100) && ( (a * a * b * b) == ((a * a + b * b) * c * c) )++ i; } printf("符合条件的组数为:%d\n",i);
#include
int main()
{
int a,b,c;
int i = 0;
for( c = 1; c = 33; ++ c )
for( b = 100; b = c; -- b )
for( a = 100; a = b; -- a)
{
if( (a + b + c < 100) && ( (a * a * b * b) == ((a * a + b * b) * c * c) )
++ i;
}
printf("符合条件的组数为:%d\n",i);
}
#include int main(){int a,b,c; int i = 0; for( c = 1; c = 33; ++ c ) for( b = 100; b = c; -- b )for( a = 100; a = b; -- a) { if( (a + b + c < 100) && ( (a * a * b * b) == ((a * a + b * b) * c * c) )++ i; } printf("符合条件的组数为:%d\n",i);
if语句后面差了一个‘)’吧
++i改为i++