| |
You are here: Experts > Computing/Technology > C/C++ > C > need for a solution
Topic: C
Expert: Joydeep Bhattacharya
Date: 3/4/2008
Subject: need for a solution
Question respected sir
i have question,which i sbelong to c,question is
what is the source code of this latin square
1 2 3 4
2 3 4 1
3 4 1 2
4 1 2 3
Answer Hi Anirban
Try this out
int i,j,k;
for(i=0;i<4;++) {
for(j=0;j<4;j++) {
printf("%d",(((i+j)%4)+1));
}
printf("\n");
}
I have not compiled and tested the code. Please forgive me for any mistakes.
regards
joydeep Bhattacharya
http://www.scodz.com
Add to this Answer
Ask a Question
|
|
|
|