Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- // Da se procita matricata od tastatura ida se ispecati zbirot na elementite vo nea.
- int main()
- {
- int m,n,i,j,sum,a[100][100];
- sum = 0;
- scanf("%d%d", &m,&n);
- for(i=0;i<n;i++)
- {
- for(j=0;j<m;j++)
- {
- scanf("%d",&a[i][j]);
- }
- }
- for(i=0;i<n;i++)
- {
- for(j=0;j<m;j++)
- {
- sum += a[i][j];
- }
- }
- printf("%d \n", sum);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement