#include<iostream>
#include<iomanip>
using namespace std;
const int iRow = 9;
const int iColumn =9;
void PrintArray(int iNum[][iColumn], int iR, int iC){
for(int i=0;i<iR;i++){
cout<< "\n";
for(int j=0; j<iC; j++){
cout<< "|"<<iNum[i][j]<<"|";
}
}
}
int main(){
int iSud[iRow][iColumn] = { { 4, 5, 2, 3, 9, 1, 8, 7, 6 },
{ 3, 1, 8, 6, 7, 5, 2, 9, 4 },
{ 6, 7, 9, 4, 2, 8, 3, 1, 5 },
{ 8, 3, 1, 5, 6, 4, 7, 2, 9 },
{ 2, 4, 5, 9, 8, 7, 1, 6, 3 },
{ 9, 6, 7, 2, 1, 3, 5, 4, 8 },
{ 7, 9, 6, 8, 5, 2, 4, 3, 1 },
{ 1, 8, 3, 7, 4, 9, 6, 5, 2 },
{ 5, 2, 4, 1, 3, 6, 9, 8, 7 }
};
PrintArray(iSud,iRow,iColumn);
}
ok I finally found a way on how to print it, but it needs some more designs to make it look like a sudoku table. can someone help how I can make the upper and lower portions lines to make the numbers look like inside the box