Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBC] Magic Square re-written

Author
Message
gearce
17
Years of Service
User Offline
Joined: 18th Dec 2006
Location: ex SCOTLAND, now MELBOURNE, Australia
Posted: 14th Oct 2007 09:45 Edited at: 16th Oct 2007 03:30
Hi there!

This is my Magic Square programme re-written.

Why am I posting again instead of editing my previous thread posted: 2nd Feb 2007 19:51? Quite simple. Edits don’t show up on the respective menu and if they don't appear, then the threads are unlikely to be revisited, thereby rendering the chance of comments less likely.

Maybe something for the powers that be to have a look at methinks.

This programme produces what is commonly known as a Magic Square, in which the sum of the numbers running horizontally, vertically or diagonally is always the same.

Each time it is run, Magic Square will create one of these squares from size 3x3 to size 9x9 with a starting number from 1 to 19. I have restricted the starting number to a high of 19 simply for screen appearance and to keep the numbers inside a square from exceeding two digits.




****** EDIT ******

See demons breath post below

gearce
(GRC)

LANG MEY YER LUM REEK
That's ODD ...... In 1911, 3 men were hung for the murder of Sir Edmund Berry at Greenbury Hill, their last names were Green, Berry, and Hill.
demons breath
21
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 14th Oct 2007 18:39
very cool man.

One thing though... should you really be continuosly gosubbing?



I think it would be better to replace that with



http://jamesmason01.googlepages.com/index.htm
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 14th Oct 2007 19:20
@gearce
What I do is edit my code and then make a new post saying "UPDATE"
then your thread will jump to the top again
it's not a bump if you've made a worthwhile edit to a previous post.

gearce
17
Years of Service
User Offline
Joined: 18th Dec 2006
Location: ex SCOTLAND, now MELBOURNE, Australia
Posted: 15th Oct 2007 07:45
demons breath

Thanks for the tip. I like it.

I'm always looking to see if someone has a different way of doing things. I'll edit the code after seeking advice as to how OBese87 would handle it.

OBese87

Quote: "What I do is edit my code and then make a new post saying "UPDATE" then your thread will jump to the top again "


Can I ask how you would handle this, given the example by demons breath?

Thanks

gearce
(GRC)

LANG MEY YER LUM REEK
That's ODD ...... In 1911, 3 men were hung for the murder of Sir Edmund Berry at Greenbury Hill, their last names were Green, Berry, and Hill.
demons breath
21
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 15th Oct 2007 19:50
He's saying just click on "EDIT POST" under your picture, change the code, submit the edited message and then add a new reply with just something like "code updated - see first post" in

http://jamesmason01.googlepages.com/index.htm
gearce
17
Years of Service
User Offline
Joined: 18th Dec 2006
Location: ex SCOTLAND, now MELBOURNE, Australia
Posted: 16th Oct 2007 03:35 Edited at: 16th Oct 2007 03:38
Thank you both for your help.

CODE UPDATED

See Posted: 14th Oct 2007 01:45 Edited: 15th Oct 2007 19:30

gearce
(GRC)

LANG MEY YER LUM REEK
That's ODD ...... In 1911, 3 men were hung for the murder of Sir Edmund Berry at Greenbury Hill, their last names were Green, Berry, and Hill.

Login to post a reply

Server time is: 2024-11-22 12:59:28
Your offset time is: 2024-11-22 12:59:28