#include stdio.h
#include conio.h
main () {
int m[5][5],l,c,valor,tc;
valor = 1;
tc = 0;
for (l=0; l<5; l++)
{
for (c=0; c<5; c++)
{
m[l][c]=valor++;
}
}
for (c=0; c<5; c++)
{
for (l=0; l<5; l++)
tc = tc + m[l][c];
printf("\n Total da coluna %d = %d",c , tc);
tc = 0;
}
getch();
}
Nenhum comentário:
Postar um comentário