Pesquisar neste blog

terça-feira, 6 de janeiro de 2009

Exemplo Matriz 2x2

#include stdio.h
#include conio.h

main () {

int m[2][2], a,b,c,d;

m[0][0] = 1;
m[0][1] = 2;
m[1][0] = 3;
m[1][1] = 4;

a = m[0][0] + m[0][1];
b = m[1][0] + m[1][1];
c = m[0][0] + m[1][0];
d = m[0][1] + m[1][1];

printf("\n [%d] [%d] [%d] [%d]",a, b, c, d);
getch();

}

Nenhum comentário: