1
0

for_cube.c 252 B

123456789101112
  1. /* for_cube.c -- using a for loop to make a table of cubes */
  2. #include <stdio.h>
  3. int main(void)
  4. {
  5. int num;
  6. printf(" n n cubed\n");
  7. for (num = 1; num <= 6; num++)
  8. printf("%5d %5d\n", num, num*num*num);
  9. return 0;
  10. }