Created
October 30, 2024 20:01
-
-
Save vlaleli/2cf54cd2cee546d0b5d9e4f456860a79 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main() { | |
| int n; | |
| cout << "Enter size: "; | |
| cin >> n; | |
| for (int i = 0; i < n; i++) { | |
| for (int j = 0; j < n; j++) { | |
| if (i == n / 2 || j == n / 2) { | |
| cout << "1 "; | |
| } else { | |
| cout << "0 "; | |
| } | |
| } | |
| cout << endl; | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment