CPP
cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//By Comsis Alexis
//Any suggestions are appreciated !
#include <iostream>
using namespace std;
int sum_hor = 0; //horizontal sum
int sum_ver = 0; //vertical sum
int sqr[3][3] = {{4,3,8},{9,5,1},{2,7,6}}; //the square
void printsqr(){
/*function that print the square in the console*/
cout << "-------" <<endl;
for (int i=0;i<3;i++){
for (int x=0;x<3;x++){
cout << "|" << sqr[i][x];
}
cout << "|" << endl;
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run