• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

urgent help on magic square

 
avelin chen
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i really really need help on this magic square program. first of all, i have been to numerous websites and still don't get the algorithm. Second, i am supposed to write a code(shown below) that outputs a magic square. could somebody tell ne just generally how to do this? THANK YOU SO MUCH!

 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello "slow poke"-

Welcome to JavaRanch.

On your way in, you may have missed that JavaRanch has a policy on screen names, and yours does not conform to it (it particular, the name must not be obviously fictitious). We take this policy seriously, so please adjust it here.

Thanks, and enjoy your time here.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As regards your question, it sound like this is a homework assignment or something. We don't provide people with solutions to those - if you have specific questions, though, we'll try to help. What does the program do so far, and what are you stuck with?
 
avelin chen
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'm sorry, i figured out how to write the code, but i also need to check to see if all the numbers add up correctly. could someone give me some kind of idea to do this? i'm kind of stumped at this point. how would you call the specific numbers in each row? help would be greatly appreciated. does my code look about right so far?

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic