So now that you know how to print 10 items on a line, do so repeatedly. Or alternatively, print each element in a loop, and decide based on [i] when to print a new-line.
Type: Posts; User: tabstop
So now that you know how to print 10 items on a line, do so repeatedly. Or alternatively, print each element in a loop, and decide based on [i] when to print a new-line.
Really? Are you sure you just didn't recognize it when you saw it?
for (int i = 0; i < 10; i++) {
printf("%d ", i);
}
What makes you think this line
printf("%7i\t %7i\t %7i\t %7i\t %7i\t %7i\t %7i\t %7i\t %7i\t %7i\n", &ary_nbr[i]);
is even a little bit legal?
Don't use \t. If you let %i alone, it will skip all whitespace (spaces, tabs, and new-lines) without any work on your part.