Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<stdlib.h>
- int main(void)
- {
- int mat[3][4];
- int lin, col;
- int i, j;
- int soma = 0;
- for(lin=0 ; lin<3 ; lin++)
- {
- for(col=0 ; col<4 ; col++)
- {
- printf("Digite os numeros da tabela : ");
- scanf("%d",&mat[lin][col]);
- }
- }
- for(i=0 ; i<3 ; i++)
- {
- for(j=0 ; j<4 ; j++)
- {
- printf("%d",mat[i][j]);
- }
- printf(" \n");
- }
- for(j=0 ; j<4 ; j++)
- {
- for(i=0 ; i< ; i++)
- {
- soma=soma+mat[i][j];
- }
- }
- printf("A soma dos elementos da matriz e' : %d", j,soma);
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement