求一百以内的勾股数
流程图:
伪代码:
源代码:
#include<iostream>
using namespace std;
int main(){
int a,b,c,i,j,k;
for(a=1;a<=100;a++){
for(b=a+1;b<=100;b++){
for(c=b+1;c<=100;c++){
if(a*a+b*b==c*c){
cout<<a<<" "<<b<<" "<<c<<"\n"<<endl;
}
}
}
}
}
标签:int,练习,29,c++,打卡,源代码 From: https://www.cnblogs.com/HD-Kudu-2219/p/17402855.html