#problem with my output

5 messages · Page 1 of 1 (latest)

split pivotBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.

clever hearth
#
#include<stdio.h>
int main()
{
  int T;
  int sum[10]={0};
  int tabel[500][500];
  
  scanf("%d",&T); 
  int i,j,k;
  int N;
  
  for(k=0;k<T;k++){
    scanf("%d",&N);
     
    for(i=0;i<N;i++){
      for(j=0;j<N;j++){
        scanf ("%d", &tabel[i][j]); 
    }
  }    
}    
    for(i=0;i<N;i++){
      for(j=0;j<N;j++){
        sum[i]=sum[i]+tabel[j][i];
    }

  }    for(k=0;k<T;k++){
        printf("Case #%d: ",(k+1));
          for(i=0;i<N;i++){
            printf("%d ",sum[i]);
    }
        printf("\n");
}
  return 0;

} ```
#

it should be like this

#

left side is the right output, right side is my output

split pivotBOT
#

This question thread is being automatically closed. If your question is not answered feel free to bump the post or re-ask. Take a look at !howto ask for tips on improving your question.