need some help with an odd magic square assignment please
1)is there a limit my code should have as to the odd integer the user can input?
2)as far as declearing my array i think i need numbers inside those braces right, i just cant put in the user's odd integer input
3)how do i set about filling my array?
plz reply asap..thnx
#include <iostream>
using namespace std;
void fillmatrix(int mat[][?], int declaredmatrixsize);
int main()
{
int matrix[][];
int matrixsize;
fillmatrix(matrix, matrixsize);
cout<<"Please enter an odd integer for the matrix size"<<endl;
cin>>matrixsize;
while(matrixsize != matrixsize / 2)
{
cout<<"Please enter an odd for the matrix size"<<endl;
cin>>matrixsize;
fillmatrix(matrix, matrixsize);
}
return 0;
}
void fillmatrix(int mat[][?], int declaredmatrixsize)
{
for(int row = 0; row < declaredmatrixsize; row++)
{
for(int col = 0; col < declaredmatrixsize; col++)
{
ar[row][col] = ;
}
}
}