+ 1

I need some help friends

EXERCISE 01 : In mathematics, a magic square of order n is composed of n integers strictly positive, written in the form of a square table. These numbers are arranged so that their sums on each line, on each column and on each main diagonal are equal. We then call constant magic (and sometimes density) the value of these sums (n * (n1) / 2). A normal magic square is a special case of a magic square, made up of all the integers of lan, where n is the order of the square. Example of a magic square of order (look the picture in sheet https://www.sololearn.com/post/14772/?ref=app ) An example of a monstrous name of order 3 and a tragic object 15 An example of a normal magic square of order 3 and of magic constant 15 Sum of the terms of a row sum of the terms of a column sum of the terms of a main diagonal 3 (3) 15. Write a program in C language to build magical squares of order n

8th Jul 2018, 2:22 PM
ahmed kobi
ahmed kobi - avatar
9 ответов
+ 2
YUGABDH PASHTE as i said, not all the conditions are met, it's just a normal magic square, i might be able to make one exactly as requested but i'm not sure if i have time
9th Jul 2018, 11:39 AM
hinanawi
hinanawi - avatar
+ 1
EXERCICE2: Either a Student defined by: number (string), name (string), first (string of characters), and average (real) Write a program in C language that periet - Declare in structure Student. - Declare a name file students .dat which will contain recordings of type A function which makes it possible to add a student introduced by the user to the file A - tonetion which makes it possible to search a student by his matrical and afticher Student student.dat information efunction which makes it possible to remove a student from from his number
8th Jul 2018, 2:28 PM
ahmed kobi
ahmed kobi - avatar
+ 1
exercise 1: input any number and it will generate an NxN magic square (you can add the numbers yourself to see if it works) (note: this may not be the exact thing you're looking for, as not all the conditions are met, but it works so) https://code.sololearn.com/c9k6H2z913t4/?ref=app
8th Jul 2018, 2:51 PM
hinanawi
hinanawi - avatar
+ 1
YUGABDH PASHTE i knew about that one, just wanted to find a math solution, which should be correct, but i probs just mistyped it
9th Jul 2018, 11:52 AM
hinanawi
hinanawi - avatar
0
thanks bro ^_^
8th Jul 2018, 4:21 PM
ahmed kobi
ahmed kobi - avatar
0
Hey I tried it run it on ur pc if it's not linux u will get some errors I will fix it for u don't try to run it on sololearner. or any online compiler will do. If anything else still need to be implemented pls tell me. https://code.sololearn.com/ciIbD862R2Ih/?ref=app
9th Jul 2018, 9:00 AM
Yugabdh
Yugabdh - avatar
0
hinanawi I guess your logic is not working properly. when u enter 3 we get first number a [0][0] = -1 Which is not right according to given conditions. also sum of diagonal and row or column is not equal.
9th Jul 2018, 9:06 AM
Yugabdh
Yugabdh - avatar
9th Jul 2018, 11:50 AM
Yugabdh
Yugabdh - avatar
0
It will be great if u find one.
9th Jul 2018, 11:55 AM
Yugabdh
Yugabdh - avatar