holas...tengo un problema al momento de mostrar la matriz, al ejecutarlo me imprime un monton de numeros y no se el por que...soy de primer semestre por fa que alguien me explique
gracias.
#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
int j,i,matriz[11][11]={ {1,1,1,1,1,1,1,1,1,1,1,
1,0,0,0,0,0,0,0,0,0,1,
1,0,2,0,0,0,0,0,2,0,1,
1,0,0,1,1,1,1,1,0,0,1,
1,0,0,0,1,3,1,0,0,0,1,
1,0,0,0,1,0,1,0,0,0,1,
1,1,0,0,1,0,1,0,0,1,1,
1,1,0,2,0,0,0,2,0,1,1,
1,1,0,0,0,4,0,0,0,1,1,
1,1,1,1,0,0,0,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1 };
for (int i=1; i<=11;i++)
{
for (int j=1; j<11;i++)
{
cout<<matriz[i][j]<<" ";
}
cout<<endl;
}
}
Mod: Los códigos deben ir en etiquetas GeSHi