I have small issue. I create 2D int array. When I cout it I get hexadecimals numbers insted of decimals. I'm using Dev C++.
#include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
const int max=9;
int ar[max][max]={
{0,6,0,0,2,0,0,4,0},
{5,0,0,3,0,0,0,0,0},
{0,8,0,0,1,0,0,0,0},
{6,0,0,0,0,7,0,0,0},
{0,3,7,0,0,0,2,8,0},
{0,2,0,8,0,0,0,3,0},
{0,0,0,0,0,0,0,0,0},
{7,0,0,4,0,0,0,0,1},
{0,0,0,0,6,0,0,2,0}};
for (int i=0;i<max;i++){
for(int j=0;j<max;j++){
cout<<ar[i,j]<<" ";
}
cout<<"\n";
}
system("pause");
return 0;
}
In return I get this http://www.dropmocks.com/mf8wl