Hello Guys; I wrote a pattern program so the output would come like this: 1 2 3 4
5 6 7 8
9 10 11 12 (where there is 4 numbers in each line and the numbers are right justified on top of each other), but right now the output comes out like this: 1 2 3 4
5 6 7 8
9 10 11 12 (where the numbers are not right justified on top of each other)could you help me figuring out how to change my program. Thanks guys. My program right now is:
int num = 1;
while (num <= 12)
{
for (int i=1; i <= 4; i++)
{
cout << num << " ";
num++;
}
cout << endl;
}