Programming Language: Java I can’t figure this one out to save my life. My current code is linked https://pastebin.com/j

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Programming Language: Java I can’t figure this one out to save my life. My current code is linked https://pastebin.com/j

Post by answerhappygod »

Programming Language: JavaI can’t figure this one out to save my life. My current code islinked question prompt is as follows:
“ A magic square is one in which every row, every column, andeach diagonal must add up to the same value. Write a program whichwill fill in the missing entries in the magic square below and thendisplay the completed magic square. “
54, 12, X, X,X, 39, X, 30,33, 27, 24, 4218, X, X, X
The magic square in question is declared and initializedin my code.
I created this long winded function to find the sum of the row,but i dont know what to do next to be able to fill in the missingvalues!
Can anyone explain what im doing wrong or how i can improve?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply