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