Runescapian321
2008-01-10 17:11:50
Well yeah I have another assignment, I have to make something that 8 rows of 8 *'s in each row. However, I have to use nested for loops. So I made this
It only returns one lines of *'s, why? It should be doing the first loop 8 times and the second loop once every time it does the first loop, but it seems that they each only do their jobs once…
Anyone?
#include "stdafx.h"
#include "genlib.h"
#include "simpio.h"
int main()
{
int i, j;
for(i=1;i<=8;i=i++);
{
for(j=1;j<=1;j=j++);
{
printf("********");
}
printf("\n");
}
}It only returns one lines of *'s, why? It should be doing the first loop 8 times and the second loop once every time it does the first loop, but it seems that they each only do their jobs once…
Anyone?