#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/29 00:08:56
#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);
已修改运行通过:共有6组.
#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);
}