leetcode-solutions

Magic Square Checker πŸŒŸπŸ”

Overview πŸ“–

This C program checks if a given square matrix is a β€œMagic Square”. A Magic Square is a square grid filled with distinct integers such that the sum of numbers in each row, column, and both main diagonals is the same.

This program was created as part of the Systems Programming 20465 course in the 2022a semester at The Open University of Israel and achieved a perfect score. πŸŽ“πŸŒŸ

Alt text


Features ✨

How to Use πŸ› οΈ

  1. Enter Matrix Size: You will be prompted to enter the size of the square (1-9).
  2. Fill the Matrix: Enter the required number of integers to fill the matrix.
  3. Magic Square Check: The program will then evaluate if the matrix is a magic square and display the result.

Examples πŸ“

3x3 Magic Square: Alt text

3x3 Non-Magic Square: Alt text

5*5 Magic Square: Alt text

invalid input: Alt text

too many inputs: Alt text

Components 🧩

Limitations ⚠️

Contributing 🀝

Feel free to fork the repo and submit pull requests for improvements!

License πŸ“œ

This project is open source and available under the MIT License.


Enjoy checking your magic squares! 🎩✨