Escolar Documentos
Profissional Documentos
Cultura Documentos
VECTORES
Ejm:
int a[4] = 30; // le asigno el valor 30 a la posición 4 del vector, es decir, al 5to
1
elemento.
01 #include <iostream>
03
04 int main()
05 {
06 int dim;
10
12 vector[i] = i * 10;
14 }
15
16 return 0;
17 }
MATRICES
1 int matriz[fils][cols];
Bueno y para recorrer una matriz podemos usar igualmente un bucle. En este caso 2
for
1 for(int i=0;i<fils;i++){
2 for(int j=0;j<cols;j++){
3 matriz[i][j] = i % j;
4 }
5}
ESQUEMA
ARRAY MULTIDIMENCIONAL
http://ronnyml.wordpress.com/2009/07/04/vectores-matrices-y-punteros-en-c/
http://logicacomputacion.blogspot.com/