-1
#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?
}
Iharob Al Asimi
  • 52,653
  • 6
  • 59
  • 97

1 Answers1

0

Instead of '%d' you can put '%10d' (any number you want) to make a field that many digits wide.

Marlene
  • 9
  • 6