AllExperts > Experts 
Search      

C

Volunteer
Answers to thousands of questions
 Home · More Questions · Answer Library  · Encyclopedia ·
More C Answers
Question Library

Ask a question about C
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Joydeep Bhattacharya
Expertise
Ability to solve C and Data Structure problems and puzzles with simple and easy to understand logic.

Experience
C, C , Data Structure, PHP, Web Designing

Organizations
http://www.scodz.com Designation: webmaster

Publications
http://www.scodz.com

Education/Credentials
Presently doing Master of Computer Application from a reputed college in Kolkata.

Past/Present Clients
http://analysingc.50webs.com http://www.funforu.com

 
   

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



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.