Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #inclue<stdio.h>
- #defne MAX 100
- int main() {
- int i,j,n,m;
- int matrica[MAX][MAX];
- int max = 0;
- int sum = 0;
- scanf("%d %d",&n,&m);
- for(i=0;i<n;i++) {
- for(j=0;j<m;j++) {
- scanf("%d",&matrica[i][j]);
- }
- }
- for(j=0;j<m;j++) {
- for(i=0;i<n;i++) {
- sum+=matrica[i][j];
- }
- if(sum>max) {
- max=sum;
- }
- sum = 0;
- }
- printf("%d",max);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement