C++ 如何打印每个阶段下的数字并使其整洁? #包括 内部主(空){ INTA、b、c; printf(“A期B期斜边”); 对于(a=1;a
而不是“%d”,您可以将“%10d”(您想要的任何数字)放入一个多位数宽的字段中C++ 如何打印每个阶段下的数字并使其整洁? #包括 内部主(空){ INTA、b、c; printf(“A期B期斜边”); 对于(a=1;a,c++,c,loops,row,C++,C,Loops,Row,而不是“%d”,您可以将“%10d”(您想要的任何数字)放入一个多位数宽的字段中 #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++){
#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?
}