#include <stdio.h>
int main(void) {
int a, b, c;
printf("stage A stage B Hypotenuse\n");
for (a=1; a<1000; a++){
for(b=1;b<1000;b++){
for(c=1;c<1000;c++){
if(a*a+b*b==c*c){
printf(" %d %d %d\n",a,b,c);
}
}
}
}
This is what i did, how can i make each one come under the stage in a row?
}
答案 0 :(得分:0)
而不是'%d',您可以将'%10d'(您想要的任意数字)设置为多个数字宽的字段。