Click here to Skip to main content
15,861,168 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
i am totally lost. i need help building a magic square that add up to 15 all columns and rows. i will need to ask for the users input in the numbers 1-9 and reply with if its a magic square or not. PLEASE HELP.

What I have tried:

i am stuck to the begining. i thought about everything but just dont know where to begin. this is my first assignment and i need your help. thank you
Posted
Updated 13-Feb-18 3:05am
Comments
Maciej Los 12-Feb-18 15:23pm    
Have you tried to Google it?
My Google returns about 116 000 results in 0.47 s.
;)
Rick York 12-Feb-18 16:15pm    
You can also look at the "related questions" section on the right side of this page. There are several previous questions regarding magic squares so you might be able to get some hints from those.

In terms of how to create the magic square, work out the logic with pencil and paper, then try to write the application.

If this is your first assignment, then you are expected to do the work.
Please do not ask someone else to do it for you.

Finally, if you are going to ask for help, be prepared to show what you've already done and, specifically, where you need help.
 
Share this answer
 
Comments
Maciej Los 12-Feb-18 15:21pm    
5ed!
You must learn programming, at best Google for some Youtube tutorials for beginners. Make some drinks and something to eat and watch for some hours to learn. Have a good time ;-)

To get a solution the first step is to break down your task into smaller solvable steps. The first step is usually to ask the user for input AND check it for valid values. Like in this I/O tutorial described.
 
Share this answer
 
Quote:
i am stuck to the begining. i thought about everything but just dont know where to begin.

I can't help but this makes me think to something like:
I want to build a space shuttle in my backyard, but I don't know where to start.
It is a hint that you don't have the basic knowledge for the project.

Advice: Learn programming.
Here is links to references books on C and C++ by the authors of the languages. Note than C is the ancestor of C++, so knowing C is always useful with C++.
The C Programming Language - Wikipedia, the free encyclopedia[^]
https://hassanolity.files.wordpress.com/2013/11/the_c_programming_language_2.pdf[^]
http://www.ime.usp.br/~pf/Kernighan-Ritchie/C-Programming-Ebook.pdf[^]

C++ Programing Language[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900