I was given a problem where I was supposed to find factorals of numbers 1 - 20. That I completed, but in the example I was given the console if formatted to be visually appealing. Heres the example I was given. The white boxes were there because I was supposed to find the answers myself. So that can be ignored.
And here's what mine looks like.
We haven't been taught anything other than printf so I don't know any alternatives.
Here's my code.
long long lngFactoral = 1;
int intNumber = 1;
for (int intIndex = 1; intIndex <= 20; intIndex ++ )
{
lngFactoral = lngFactoral * intIndex;
printf("%d! = %lli ", intIndex, lngFactoral);
intIndex++;
lngFactoral = lngFactoral * intIndex;
printf(" %d! = %lli \n", intIndex, lngFactoral);
}