Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #define MR 100
- #define MS 200
- int main(void){
- int r, s, j, i, sum, max=-99999, br;
- do {
- scanf("%d %d", &r, &s);
- } while (r>MR || s>MS || r<1 || s<1);
- int a[r][s];
- for(i=0; i<r; i++){
- for(j=0; j<s; j++){
- scanf("%d", &a[i][j]);
- }
- }
- for(j=0; j<s; j++){
- sum=0;
- for(i=0; i<r; i++){
- sum+=a[i][j];
- }
- if(max<sum){
- max=sum;
- br=j;
- }
- }
- for(j=br;j<(br+1);j++){
- for(i=0; i<r; i++){
- printf("%d", a[i][j]);
- }
- printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement