I am trying to get a program to print the following Cayley table on screen:-
The problem is that my code prints this:-
I can see why it is doing this. Its because the variable 'b' reaches 9 and at a this point it needs to be reset to 1.
My code is as follows:-
int main (void)
int a = 1;
int b = 1;
int c = 1;
int d = 1;
for (c=1; c<=8; b=b+1,c=c+1) ***** printf("%d",b);
At the point marked with 5 stars, the line "if(b>=8)b=1" needs to be added, the problem is the compiler comes up with "EXPRESSION SYNTAX" errors. I cannot use any semicolon near this bit of code or the program will not check to see if 'b' has reached 9 before resetting it back to 1 within the loop using variable 'c'.
I did post a suggestion here the day b4 yesterday and have tried what was suggested but
I could not get it to work. Please copy the code into a compiler and try it, you will see then what my problem is.
I have tried for AGES many different ways of trying to get this program to work
but without success. Whoever can help me complete this deserves a medal.
Thank-you once again.