criyle/codenet-compile-errors huggingface dataset:
Language: Java

public class Main {

	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {

		while (sc.hasNext()) {
			int n = Integer.parseInt(sc.nextLine());
			calcMat(n);
		}
	}

	private static void calcMat(int n) {
		int[][] mt = new int[n + 1][n + 1];

			for (int i = 0; i < n; i++) {
				String[] dt = sc.nextLine().split(" ");
				for (int j = 0; j < n; j++) {
					mt[i][j] =  Integer.parseInt(dt[j]);
					mt[i][n] +=  mt[i][j];
					mt[n][j] += mt[i][j];
				}
			}

			for (int i = 0; i < n; i++) {
				mt[n][n] += mt[i][n];
			}

			for (int i = 0; i < n + 1; i++) {
				for (int j = 0; j < n + 1; j++) {
					String sp = (j < n)? "" : "\n";
					System.out.printf("%5d%s",mt[i][j] ,sp);
				}
			}
	}
}


Compiler output:
Main.java:3: error: cannot find symbol
	static Scanner sc = new Scanner(System.in);
	       ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
	static Scanner sc = new Scanner(System.in);
	                        ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.*;

public class Main {
 Scanner sc = new Scanner)System.in;
 void run() {
  while (true) {
   int n = sc.nextInt();
   if (n == 0) break;
   int[][] mat = new int[n+1][n+1];
   for (int i=0;i<n;i++) for (int j=0;j<n;j++) {
    mat[i][j] = sc.nextInt();
    mat[i][n] = mat[i][j];
    mat[n][j] = mat[i][j];
   }
   for( int i=0;i<n+1;i++) {for(int j=0;j<n+1;j++) {
    System.out.printf("%5d",mat[i][j]);
   }
   System.out.println();
   }
  }
 }
 public static void main(String[] args) {
  new Main().run();
 }
}

Compiler output:
Main.java:4: error: '(' or '[' expected
 Scanner sc = new Scanner)System.in;
                         ^
Main.java:4: error: <identifier> expected
 Scanner sc = new Scanner)System.in;
                                   ^
2 errors
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

import sun.security.krb5.KdcComm;
import sun.tools.jar.resources.jar;

public class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {

		int				value;
		BufferedReader	reader = new BufferedReader(new InputStreamReader(System.in));
		List<String>	listStrings = new ArrayList<String>();
		List<Integer>	listMaxIntegers = new ArrayList<Integer>();

		while((value = Integer.parseInt(reader.readLine())) != 0){
			listMaxIntegers.add(value);
			for(int i = 0; i < value; i++)	listStrings.add(reader.readLine());
		}

		value = 0;
		for(int max : listMaxIntegers){
			int sum = 0;
			int[][] list = new int[max][max];

			for(int i = value; i - value < max;i++){
				String[] 	split = listStrings.get(i).split(" ");
				int 		sumOf = 0;

				for(int j = 0; j < max; j++){
					sumOf += Integer.parseInt(split[j]);
					list[i - value][j] = Integer.parseInt(split[j]);
					System.out.printf("%5d", Integer.parseInt(split[j]));
				}

				System.out.printf("%5d\n", sumOf);
			}

			int[] listSum = new int[max];
			for(int j = 0; j < max; j++){
				int sumOf = 0;

				for(int k = 0; k < max; k++){
					sumOf += list[k][j];
				}

				System.out.printf("%5d", sumOf);
				listSum[j] = sumOf;
				sum+= sumOf;
			}

			System.out.printf("%5d\n", sum);

			value += max;
		}
	}
}

Compiler output:
Main.java:7: error: package sun.security.krb5 is not visible
import sun.security.krb5.KdcComm;
                   ^
  (package sun.security.krb5 is declared in module java.security.jgss, which does not export it to the unnamed module)
Main.java:8: error: package sun.tools.jar.resources is not visible
import sun.tools.jar.resources.jar;
                    ^
  (package sun.tools.jar.resources is declared in module jdk.jartool, which does not export it)
2 errors
Language: C

#include<stdio.h>
int main(void){
  int a[11][11];
  int b[11][11];
  int i,j,k,l;
  int n;

  while(1){
    a[11][11]={0};
    b[11][11]={0};
    scanf("%d",&n);
    if(n==0)
      break;
    for(i=0;i<n;i++)
      for(j=0;j<n;j++)
	scanf("%d",&a[i][j]);

    for(i=0;i<n;i++)
      for(j=0;j<n;j++)
	a[i][n]+=a[i][j];
    for(j=0;j<n;j++)
      for(i=0;i<n;i++)
	a[n][j]+=a[i][j];
    for(i=0;i<n;i++)
      a[n][n]+=a[i][n];

    for(i=0;i<n+1;i++){
      for(j=0;j<n+1;j++)
	printf("%5d",a[i][j]);
      printf("\n");
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:15: error: expected expression before '{' token
    9 |     a[11][11]={0};
      |               ^
main.c:10:15: error: expected expression before '{' token
   10 |     b[11][11]={0};
      |               ^
Language: C


#include<stdio.h>
int main(){
	int n[10][10] = {}, x[9] ={}, y[9] {}, a, i, j;
	while(1){
		scanf("%d",&a);
		if(a!=0){
			for(j=0,j<a;j++){
				for(i=0,i<a;i++){
					scanf("%d",&n[j][i]);	
				}
			}
			for(i=0;i<9;i++){
				x[i] = n[0][i]+n[1][i]+n[2][i]+n[3][i]+n[4][i]+n[5][i]+n[6][i]+n[7][i]+n[8][i];
				y[i] = n[i][0]+n[i][1]+n[i][2]+n[i][3]+n[i][4]+n[i][5]+n[i][6]+n[i][7]+n[i][8];
			}
			for(i=0;i<a;i++){
				for(j=o;j<a;j++){
					printf("%5d",n[j][i]);
			}
			printf("%5d",y[i]);
			}
			for(i=0;i<a;i++){
				printf("%5d",x[i]);
			}
			printf("%5d",x[0]+y[0]+x[1]+y[1]+x[2]+y[2]+x[3]+y[3]+x[4]+y[4]+x[5]+y[5]+x[6]+y[6]+x[7]+y[7]+x[8]+y[8]);
		}else{
			break;
		}
	}
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    4 |         int n[10][10] = {}, x[9] ={}, y[9] {}, a, i, j;
      |                                            ^
main.c:4:46: error: expected expression before ',' token
    4 |         int n[10][10] = {}, x[9] ={}, y[9] {}, a, i, j;
      |                                              ^
main.c:4:48: error: 'a' undeclared (first use in this function)
    4 |         int n[10][10] = {}, x[9] ={}, y[9] {}, a, i, j;
      |                                                ^
main.c:4:48: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:51: error: 'i' undeclared (first use in this function)
    4 |         int n[10][10] = {}, x[9] ={}, y[9] {}, a, i, j;
      |                                                   ^
main.c:4:54: error: 'j' undeclared (first use in this function)
    4 |         int n[10][10] = {}, x[9] ={}, y[9] {}, a, i, j;
      |                                                      ^
main.c:8:40: error: expected ';' before ')' token
    8 |                         for(j=0,j<a;j++){
      |                                        ^
      |                                        ;
main.c:9:48: error: expected ';' before ')' token
    9 |                                 for(i=0,i<a;i++){
      |                                                ^
      |                                                ;
main.c:15:33: error: 'y' undeclared (first use in this function)
   15 |                                 y[i] = n[i][0]+n[i][1]+n[i][2]+n[i][3]+n[i][4]+n[i][5]+n[i][6]+n[i][7]+n[i][8];
      |                                 ^
main.c:18:39: error: 'o' undeclared (first use in this function)
   18 |                                 for(j=o;j<a;j++){
      |                                       ^
Language: C


#include<stdio.h>
int main(){
	int n[10][10] = {}, x[9] = {}, y[9] = {}, a, i, j;
	while(1){
		scanf("%d",&a);
		if(a!=0){
			for(j=0,j<a;j++){
				for(i=0,i<a;i++){
					scanf("%d",&n[j][i]);	
				}
			}
			for(i=0;i<9;i++){
				x[i] = n[0][i]+n[1][i]+n[2][i]+n[3][i]+n[4][i]+n[5][i]+n[6][i]+n[7][i]+n[8][i];
				y[i] = n[i][0]+n[i][1]+n[i][2]+n[i][3]+n[i][4]+n[i][5]+n[i][6]+n[i][7]+n[i][8];
			}
			for(i=0;i<a;i++){
				for(j=o;j<a;j++){
					printf("%5d",n[j][i]);
			}
			printf("%5d",y[i]);
			}
			for(i=0;i<a;i++){
				printf("%5d",x[i]);
			}
			printf("%5d",x[0]+y[0]+x[1]+y[1]+x[2]+y[2]+x[3]+y[3]+x[4]+y[4]+x[5]+y[5]+x[6]+y[6]+x[7]+y[7]+x[8]+y[8]);
		}else{
			break;
		}
	}
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:40: error: expected ';' before ')' token
    8 |                         for(j=0,j<a;j++){
      |                                        ^
      |                                        ;
main.c:9:48: error: expected ';' before ')' token
    9 |                                 for(i=0,i<a;i++){
      |                                                ^
      |                                                ;
main.c:18:39: error: 'o' undeclared (first use in this function)
   18 |                                 for(j=o;j<a;j++){
      |                                       ^
main.c:18:39: note: each undeclared identifier is reported only once for each function it appears in
Language: C


#include<stdio.h>
int main(){
	int n[10][10] = {}, x[9] = {}, y[9] = {}, a, i, j;
	while(1){
		scanf("%d",&a);
		if(a!=0){
			for(j=0,j<a;j++){
				for(i=0,i<a;i++){
					scanf("%d",&n[j][i]);	
				}
			}
			for(i=0;i<9;i++){
				x[i] = n[0][i]+n[1][i]+n[2][i]+n[3][i]+n[4][i]+n[5][i]+n[6][i]+n[7][i]+n[8][i];
				y[i] = n[i][0]+n[i][1]+n[i][2]+n[i][3]+n[i][4]+n[i][5]+n[i][6]+n[i][7]+n[i][8];
			}
			for(i=0;i<a;i++){
				for(j=o;j<a;j++){
					printf("%5d",n[j][i]);
			}
			printf("%5d",y[i]);
			}
			for(i=0;i<a;i++){
				printf("%5d",x[i]);
			}
			printf("%5d",x[0]+y[0]+x[1]+y[1]+x[2]+y[2]+x[3]+y[3]+x[4]+y[4]+x[5]+y[5]+x[6]+y[6]+x[7]+y[7]+x[8]+y[8]);
		}else if(a=0){
			break;
		}
	}
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:40: error: expected ';' before ')' token
    8 |                         for(j=0,j<a;j++){
      |                                        ^
      |                                        ;
main.c:9:48: error: expected ';' before ')' token
    9 |                                 for(i=0,i<a;i++){
      |                                                ^
      |                                                ;
main.c:18:39: error: 'o' undeclared (first use in this function)
   18 |                                 for(j=o;j<a;j++){
      |                                       ^
main.c:18:39: note: each undeclared identifier is reported only once for each function it appears in
Language: C


#include<stdio.h>
int main(){
	int n[9][9] = {0}, x[9] = {0}, y[9] = {0}, a, i, j;
	while(1){
		scanf("%d",&a);
		if(a!=0){
			for(j=0,j<a;j++){
				for(i=0,i<a;i++){
					scanf("%d",&n[j][i]);	
				}
			}
			for(i=0;i<9;i++){
				x[i] = n[0][i]+n[1][i]+n[2][i]+n[3][i]+n[4][i]+n[5][i]+n[6][i]+n[7][i]+n[8][i];
				y[i] = n[i][0]+n[i][1]+n[i][2]+n[i][3]+n[i][4]+n[i][5]+n[i][6]+n[i][7]+n[i][8];
			}
			for(i=0;i<a;i++){
				for(j=o;j<a;j++){
					printf("%5d",n[j][i]);
				}
				printf("%5d",y[i]);
			}
			
			for(i=0;i<a;i++){
				printf("%5d",x[i]);
			}
			printf("%5d",x[0]+y[0]+x[1]+y[1]+x[2]+y[2]+x[3]+y[3]+x[4]+y[4]+x[5]+y[5]+x[6]+y[6]+x[7]+y[7]+x[8]+y[8]);
		}else if(a=0){
			break;
		}
	}
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:40: error: expected ';' before ')' token
    8 |                         for(j=0,j<a;j++){
      |                                        ^
      |                                        ;
main.c:9:48: error: expected ';' before ')' token
    9 |                                 for(i=0,i<a;i++){
      |                                                ^
      |                                                ;
main.c:18:39: error: 'o' undeclared (first use in this function)
   18 |                                 for(j=o;j<a;j++){
      |                                       ^
main.c:18:39: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(){
	int n[9][9] = {0}, x[9] = {0}, y[9] = {0}, a, i, j;
	while(1){
		scanf("%d",&a);
		if(a!=0){
			for(j=0;j<a;j++){
				for(i=0;i<a;i++){
					scanf("%d",&n[j][i]);	
				}
			}
			for(i=0;i<9;i++){
				x[i] = n[0][i]+n[1][i]+n[2][i]+n[3][i]+n[4][i]+n[5][i]+n[6][i]+n[7][i]+n[8][i];
				y[i] = n[i][0]+n[i][1]+n[i][2]+n[i][3]+n[i][4]+n[i][5]+n[i][6]+n[i][7]+n[i][8];
			}
			for(i=0;i<a;i++){
				for(j=o;j<a;j++){
					printf("%5d",n[j][i]);
				}
				printf("%5d",y[i]);
			}
			
			for(i=0;i<a;i++){
				printf("%5d",x[i]);
			}
			printf("%5d",x[0]+y[0]+x[1]+y[1]+x[2]+y[2]+x[3]+y[3]+x[4]+y[4]+x[5]+y[5]+x[6]+y[6]+x[7]+y[7]+x[8]+y[8]);
		}else if(a=0){
			break;
		}
	}
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:39: error: 'o' undeclared (first use in this function)
   17 |                                 for(j=o;j<a;j++){
      |                                       ^
main.c:17:39: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<stdafx.h>
int main(){
	int n[9][9] = {0}, x[9] = {0}, y[9] = {0}, a, i, j;
	while(1){
		scanf("%d",&a);
		if(a!=0){
			for(j=0;j<a;j++){
				for(i=0;i<a;i++){
					scanf("%d",&n[j][i]);	
				}
			}
			for(i=0;i<9;i++){
				x[i] = n[0][i]+n[1][i]+n[2][i]+n[3][i]+n[4][i]+n[5][i]+n[6][i]+n[7][i]+n[8][i];
				y[i] = n[i][0]+n[i][1]+n[i][2]+n[i][3]+n[i][4]+n[i][5]+n[i][6]+n[i][7]+n[i][8];
			}
			for(i=0;i<a;i++){
				for(j=o;j<a;j++){
					printf("%5d",n[j][i]);
				}
				printf("%5d",y[i]);
			}
			
			for(i=0;i<a;i++){
				printf("%5d",x[i]);
			}
			printf("%5d",x[0]+y[0]+x[1]+y[1]+x[2]+y[2]+x[3]+y[3]+x[4]+y[4]+x[5]+y[5]+x[6]+y[6]+x[7]+y[7]+x[8]+y[8]);
		}else if(a=0){
			break;
		}
	}
	
	return 0;
}

Compiler output:
main.c:2:9: fatal error: stdafx.h: No such file or directory
    2 | #include<stdafx.h>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
int main(){
	int i,j,ans[10]={0},n,tmp,sum;
	while(scanf("%d",&n)!=EOF){
		for(i=0;i<n;i++){
			for(j=0;j<n;j++){
				scnaf("%d",&tmp);
				if(i==0)ans[j]=tmp;
				else ans[j]+=tmp;
				if(j==0)sum=tmp;
				else sum+=tmp;
				printf("%5d",tmp);
			}
			printf("%5d\n",sum);
		}
		for(i=0,sum=0;i<n;i++){
			printf("%5d",ans[i]);
			sum+=ans[i];
		}
		printf("%5d\n",sum);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:33: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |                                 scnaf("%d",&tmp);
      |                                 ^~~~~
      |                                 scanf
Language: C

#include<stdio.h>
int main(void){
	int i,j,ans[10]={0},n,tmp,sum;
	while(scanf("%d",&n),n!=EOF){
		for(i=0;i<n;i++){
			for(j=0;j<n;j++){
				scnaf("%d",&tmp);
				if(i==0)ans[j]=tmp;
				else ans[j]+=tmp;
				if(j==0)sum=tmp;
				else sum+=tmp;
				printf("%5d",tmp);
			}
			printf("%5d\n",sum);
		}
		for(i=0,sum=0;i<n;i++){
			printf("%5d",ans[i]);
			sum+=ans[i];
		}
		printf("%5d\n",sum);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:33: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |                                 scnaf("%d",&tmp);
      |                                 ^~~~~
      |                                 scanf
Language: C

#include<stdio.h>
int main(void){
	int i,j,ans[10]={0},n,tmp,sum;
	while(scanf("%d",&n)!=EOF){
		for(i=0;i<n;i++){
			for(j=0;j<n;j++){
				scnaf("%d",&tmp);
				if(i==0)ans[j]=tmp;
				else ans[j]+=tmp;
				if(j==0)sum=tmp;
				else sum+=tmp;
				printf("%5d",tmp);
			}
			printf("%5d\n",sum);
		}
		for(i=0,sum=0;i<n;i++){
			printf("%5d",ans[i]);
			sum+=ans[i];
		}
		printf("%5d\n",sum);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:33: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |                                 scnaf("%d",&tmp);
      |                                 ^~~~~
      |                                 scanf
Language: C

#inclued <stdio.h>
#include <assert.h>
#include <limits.h>

int main() {
	int i, j, k = 0;
	int n[INT_MAX], data[INT_MAX][INT_MAX][INT_MAX];
	
	do {
		scanf("%d", &n[k]);
		assert(n[k] <= 10);
	
		for(i = 0; i < n[k]; i ++) {
			for(j = 0; j < n[k]; j ++) {
				scanf("%d ", &data[i][j][k]);
				assert(data[i][j][k] <= 100);
				
				data[n[k]][j] += data[i][j][k];
				data[i][n[k]] += data[i][j][k];
			}
		}
		data[n[k]][n[k]][k] = data[i][n[k]][k] + datan[n[k]][j][k];
		
		k ++;
	} while(n[k] != 0);

	for(int l = 0; l < k; l ++) {
		for(i = 0; i <= n[l]; i ++) {
			for(j = 0; j <= n[l]; j ++) {
				printf("%5d", &data[i][j][l]);
			}
			printf("\n");
			if(i == n[l])
				printf("%5d", &data[i][j][l]);
		}
	}
	
	return 0;
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #inclued; did you mean #include?
    1 | #inclued <stdio.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:7:25: error: size '18446744056529682436' of array 'data' exceeds maximum object size '9223372036854775807'
    7 |         int n[INT_MAX], data[INT_MAX][INT_MAX][INT_MAX];
      |                         ^~~~
main.c:10:17: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   10 |                 scanf("%d", &n[k]);
      |                 ^~~~~
main.c:4:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    3 | #include <limits.h>
  +++ |+#include <stdio.h>
    4 | 
main.c:10:17: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   10 |                 scanf("%d", &n[k]);
      |                 ^~~~~
main.c:10:17: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:22:58: error: 'datan' undeclared (first use in this function); did you mean 'data'?
   22 |                 data[n[k]][n[k]][k] = data[i][n[k]][k] + datan[n[k]][j][k];
      |                                                          ^~~~~
      |                                                          data
main.c:22:58: note: each undeclared identifier is reported only once for each function it appears in
main.c:30:33: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   30 |                                 printf("%5d", &data[i][j][l]);
      |                                 ^~~~~~
main.c:30:33: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:30:33: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:30:33: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:32:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   32 |                         printf("\n");
      |                         ^~~~~~
main.c:32:25: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C


#include <cstdio>

int main(){
  int i,j,n,a[10][10],b[10],c[10],sum;
  while(1){

    scanf("%d",&n);
    if(n == 0) break;
    sum = 0;

    for(i=0;i<n;i++){
      b[i] = 0;
      for(j=0;j<n;j++){
	scanf("%d",&a[i][j]);
	b[i] += a[i][j];
	sum += a[i][j];
      }
    }
    for(i=0;i<n;i++){
      c[i] = 0;
      for(j=0;j<n;j++){
	c[i] += a[j][i];
      }
    }

    for(i=0;i<n;i++){
      for(j=0;j<n;j++){
	printf("%5d ",a[i][j]);
      }
      printf("%5d\n",b[i]);
    }
    for(i=0;i<n;i++){
      printf("%5d ",c[i]);
    }
    printf("%5d\n",sum);

  }
  return 0;
}

Compiler output:
main.c:2:10: fatal error: cstdio: No such file or directory
    2 | #include <cstdio>
      |          ^~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>

int main(void){
  int i,j,n,table[11][11],w;

  while(1){
    scanf("%d",&n);
    if(n==0)break;
    w=0;
    for(i=0;i<11;i++)
      table[n][i]=0;
    
    for(i=0;i<n;i++){
      for(j=0;j<n;j++){
	scanf("%d",&table[i][j]);
	w+=table[i][j];
	if(j==n-1){
	  table[i][j+1]=w;
	  w=0;
	}
	table[n][j]+=table[i][j];
      }
    }

    for(i=0;i<n;i++){
      table[n][n]+=table[n][i];
}

    for(i=0;i<=n;i++){
      for(j=0;j<=n;j++){
	printf("%5d",table[i][j]);
	printf((j==n)?"\n":);
      }
    }
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:32:28: error: expected expression before ')' token
   32 |         printf((j==n)?"\n":);
      |                            ^
Language: C

#include<iostream>
#include<iomanip>

using namespace std;

int matrix[11][11];

int main()
{
	int n,sum;
	
	for(;;)
	{
		cin>>n;
		if(n==0)break;
		for(int i=0;i<n;i++)
		{
			for(int j=0;j<n;j++)
			{
				cin>>matrix[i][j];
			}
		}

		for(int i=0;i<n;i++)
		{
			sum=0;
			for(int j=0;j<n;j++)
			{
				sum+=matrix[i][j];
			}
			matrix[i][n]=sum;
		}
		for(int j=0;j<n;j++)
		{
			sum=0;
			for(int i=0;i<n;i++)
			{
				sum+=matrix[i][j];
			}
			matrix[n][j]=sum;
		}
		sum=0;
		for(int i=0;i<n;i++)
		{
			sum+=matrix[i][n];
		}
		matrix[n][n]=sum;
		
		for(int i=0;i<=n;i++)
		{
			for(int j=0;j<=n;j++)
			{
				if(j>0)cout<<' ';
				cout<<setfill(' ')<<setw(5)<<right<<matrix[i][j];
			}
			cout<<endl;
		}
	}
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
#include<string>
#include<stdlib.h>
#include<math.h>
#include<iostream>
#include<vector>
#include<algorithm>
#include<numeric>
#include<string.h>

using namespace std;

typedef pair<int,int> pii;

#define rep(i,j) for(int i=0;i<(j);i++)
#define reps(i,j,k) for(int i=j;i<=k;i++)


int main(){
	int n,t;
	int d[20][20];
	for(;;){
		scanf("%d",&n);
		if(n==0)break;
		rep(i,n){
			t=0;
			rep(j,n){
				scanf("%d",d[i]+j);
				t+=d[i][j];
			}
			d[i][n]=t;
		}
		rep(i,n+1){
			t=0;
			rep(j,n)t+=d[j][i];
			d[n][i]=t;
		}
		rep(i,n+1){rep(j,n+1)printf("%5d",d[i][j]);puts("");}
	}
	return 0;
}

Compiler output:
main.c:2:9: fatal error: string: No such file or directory
    2 | #include<string>
      |         ^~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
int main(void)
{
  int a[10]={0},b[10]={0};
  int i,k,x[10][10],n,sum=0;

  scanf("%d",&n);

  for(i=0;i<n;i++){
    for(k=0:k<n;k++){
      scanf("%d",&x[i][k]);
      a[k]+=x;
      b[i]+=x;
    }
  }

  for(i=0;i<n;i++){
    for(k=0:k<n;k++){
      printf("%5d",x[i][k]);
    }
    printf("%5d\n",b[i]);
  }

  for(i=0;i<n;i++){printf("%5d",a[i]);sum+=a[i];}
  
  printf("%5d\n",sum);
  return 0;
}
      

Compiler output:
main.c: In function 'main':
main.c:10:12: error: expected ';' before ':' token
   10 |     for(k=0:k<n;k++){
      |            ^
      |            ;
main.c:10:20: error: expected ';' before ')' token
   10 |     for(k=0:k<n;k++){
      |                    ^
      |                    ;
main.c:12:11: error: assignment to 'int' from 'int (*)[10]' makes integer from pointer without a cast [-Wint-conversion]
   12 |       a[k]+=x;
      |           ^~
main.c:13:11: error: assignment to 'int' from 'int (*)[10]' makes integer from pointer without a cast [-Wint-conversion]
   13 |       b[i]+=x;
      |           ^~
main.c:18:12: error: expected ';' before ':' token
   18 |     for(k=0:k<n;k++){
      |            ^
      |            ;
main.c:18:20: error: expected ';' before ')' token
   18 |     for(k=0:k<n;k++){
      |                    ^
      |                    ;
Language: C

#include<stdio.h>
int main(void)
{
  int a[10]={0},b[10]={0};
  int i,k,x[10][10],n,sum=0;

  scanf("%d",&n);

  for(i=0;i<n;i++){
    for(k=0;k<n;k++){
      scanf("%d",&x[i][k]);
      a[k]+=x;
      b[i]+=x;
    }
  }

  for(i=0;i<n;i++){
    for(k=0:k<n;k++){
      printf("%5d",x[i][k]);
    }
    printf("%5d\n",b[i]);
  }

  for(i=0;i<n;i++){printf("%5d",a[i]);sum+=a[i];}
  
  printf("%5d\n",sum);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:11: error: assignment to 'int' from 'int (*)[10]' makes integer from pointer without a cast [-Wint-conversion]
   12 |       a[k]+=x;
      |           ^~
main.c:13:11: error: assignment to 'int' from 'int (*)[10]' makes integer from pointer without a cast [-Wint-conversion]
   13 |       b[i]+=x;
      |           ^~
main.c:18:12: error: expected ';' before ':' token
   18 |     for(k=0:k<n;k++){
      |            ^
      |            ;
main.c:18:20: error: expected ';' before ')' token
   18 |     for(k=0:k<n;k++){
      |                    ^
      |                    ;
Language: C

include<stdio.h>
main(){
  int data,i,j;
  int a[101][101];
  while(1){
    scanf("%d",&data);
    if(data == 0) break;
    for(i=0;i<data;i++){
      for(j=0;j<data;j++){
	scanf("%d",&a[i][j]);
	a[i][data] += a[i][j];
	a[data][j] += a[i][j];
	a[data][data] += a[i][j];
      }
    }
    for(i=0;i<data+1;i++){
      for(j=0;j<data+1;j++){
	printf("%5d",a[i][j]);
	if(j == data){
	  printf("\n");
	}
      }
    }
  }
  return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C++

#!/usr/bin/python
# -*- coding: utf-8 -*-

def main():
    while(True):
        # 入力
        N = int(raw_input())
        if N == 0:
            break

        inp = []
        for x in range(N):
            input_list = map(int, raw_input().split())
            inp.append(input_list)

        printAns(inp)

def printAns(num_list):
    add_list = []
    for x in num_list:
        x.append(sum(x))
        add_list.append(x)

    total_list = [sum(x) for x in zip(*add_list)]
    add_list.append(total_list)
    print5digit(add_list)

def print5digit(num_list):
    for x in num_list:
        print "".join(map(lambda x_: str(x_).rjust(5), x))

if __name__=='__main__':
    main()

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!/usr/bin/python
      |  ^
a.cc:2:3: error: invalid preprocessing directive #-
    2 | # -*- coding: utf-8 -*-
      |   ^
a.cc:6:11: error: invalid preprocessing directive #\U00005165\U0000529b
    6 |         # 入力
      |           ^~~~
a.cc:32:14: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   32 | if __name__=='__main__':
      |              ^~~~~~~~~~
a.cc:4:1: error: 'def' does not name a type
    4 | def main():
      | ^~~
Language: C++

#include<stdio.h>
#include<iostream>
#include<math.h>
using namespace std;

int main(){
int N,num[11][11]={},x;
int a;
while(1)
{cin>>N;
if(N==0)break;
for(int i=0;i<N;i++){
for(int j=0;j<N;j++)
{cin>>num[i][j];num[i][N]+=num[i][j];}
}
for(int i=0;i<N;i++)
num[N][N]+=num[i][N];
for(int i=0;i<N;i++)
	for(int j=0;j<N;j++)
num[N][i]+=num[j][i];

for(int i=0;i<=N;i++){
for(int j=0;j<=N;j++)
{
a =5-( (int)log10((double)(num[i][j]) )+ 1);
for(int k=0;k<a;k++)
{cout<<" ";}
cout<<num[i][j];}
cout<<endl;a=0


}

for(int i=0;i<=N;i++){
for(int j=0;j<=N;j++){
num[i][j]=0;
}
}


}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:15: error: expected ';' before '}' token
   29 | cout<<endl;a=0
      |               ^
      |               ;
......
   32 | }
      | ~
Language: C++

#include<stdio.h>
#include<iostream>
#include<math.h>
using namespace std;

int main(){
	double num[12][12]={};
	int N ;
int a=0;
while(1)
{cin>>N;
if(N==0)break;
for(int i=0;i<N;i++){
for(int j=0;j<N;j++)
{cin>>num[i][j];num[i][N]+=num[i][j];}
}
for(int i=0;i<N;i++)
num[N][N]+=num[i][N];
for(int i=0;i<N;i++)
	for(int j=0;j<N;j++)
num[N][i]+=num[j][i];

for(int i=0;i<=N;i++){
for(int j=0;j<=N;j++)
{
printf("5%lf",num[i][;}
cout<<endl;


}

for(int i=0;i<=N;i++){
for(int j=0;j<=N;j++){
num[i][j]=0;
}
}


}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:22: error: expected primary-expression before ';' token
   26 | printf("5%lf",num[i][;}
      |                      ^
a.cc:26:22: error: expected ']' before ';' token
   26 | printf("5%lf",num[i][;}
      |                      ^
      |                      ]
Language: C++

#include<stdio.h>
#include<stdafx.h>
int main(){
	int n[9][9] = {0}, x[9] = {0}, y[9] = {0}, a, i, j;
	while(1){
		scanf("%d",&a);
		if(a!=0){
			for(j=0;j<a;j++){
				for(i=0;i<a;i++){
					scanf("%d",&n[j][i]);	
				}
			}
			for(i=0;i<9;i++){
				x[i] = n[0][i]+n[1][i]+n[2][i]+n[3][i]+n[4][i]+n[5][i]+n[6][i]+n[7][i]+n[8][i];
				y[i] = n[i][0]+n[i][1]+n[i][2]+n[i][3]+n[i][4]+n[i][5]+n[i][6]+n[i][7]+n[i][8];
			}
			for(i=0;i<a;i++){
				for(j=o;j<a;j++){
					printf("%5d",n[j][i]);
				}
				printf("%5d\n",y[i]);
			}
			
			for(i=0;i<a;i++){
				printf("%5d",x[i]);
			}
			printf("%5d",x[0]+y[0]+x[1]+y[1]+x[2]+y[2]+x[3]+y[3]+x[4]+y[4]+x[5]+y[5]+x[6]+y[6]+x[7]+y[7]+x[8]+y[8]);
		}else if(a=0){
			break;
		}
	}
	
	return 0;
}

Compiler output:
a.cc:2:9: fatal error: stdafx.h: No such file or directory
    2 | #include<stdafx.h>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream.h>
#include <vector>
using namespace std;

int main(){
	int data_size;
	cin >> data_size;
	while (data_size){
		vector<vector<int>> data;
		vector<vector<int>> data_digit;
		data.resize((data_size + 1)*(data_size + 1));
		data_digit.resize((data_size + 1) * (data_size + 1));
		for (int i = 0; i < data_size; i++){
			data[i].resize(data_size + 1);
			data_digit[i].resize(data_size + 1);
			for (int j = 0; j < data_size; j++){
				cin >> data[i][j];
				int tmp = data[i][j];
				data_digit[i][j] = 0;
				while (tmp){
					tmp /= 10;
					data_digit[i][j]++;
				}
			}
		}
		data[data_size].resize(data_size + 1);
		data_digit[data_size].resize(data_size + 1);
		for (int i = 0; i < data_size; i++){
			int sum = 0;
			for (int j = 0; j < data_size; j++){
				sum += data[i][j];
			}
			data[i][data_size] = sum;
			int tmp = sum;
			data_digit[i][data_size] = 0;
			while (tmp){
				tmp /= 10;
				data_digit[i][data_size]++;
			}

		}
		for (int i = 0; i < data_size + 1; i++){
			int sum = 0;
			for (int j = 0; j < data_size; j++){
				sum += data[j][i];
			}
			data[data_size][i] = sum;
			int tmp = sum;
			data_digit[data_size][i] = 0;
			while (tmp){
				tmp /= 10;
				data_digit[data_size][i]++;
			}
		}

		for (int i = 0; i < data_size + 1; i++){
			for (int j = 0; j < data_size + 1; j++){
				for (int k = data_digit[i][j]; k < 5; k++){
					cout << " ";
				}
				cout << data[i][j];
			}
			cout << "\n";
		}
		cin >> data_size;
	}
	return 0;
}

Compiler output:
a.cc:1:10: fatal error: iostream.h: No such file or directory
    1 | #include <iostream.h>
      |          ^~~~~~~~~~~~
compilation terminated.
Language: C++

import java.util.*;
import java.lang.*;
import java.io.*;

public class Main{
	public static void main (String[] args) throws java.lang.Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	    String line = br.readLine();
	    while(!line.equals("0")){
	        int n = Integer.parseInt(line);
	        int[] sum_arr = new int[n];
            int[][] table = new int[n+1][n+1];
	        for(int i=0;i<n;i++){
	            line = br.readLine();
	            String[] lines = line.split(" ");
	            int j=0;
	            int sum = 0;
	            for(String st:lines){
	                int tmp = Integer.parseInt(st);
	                table[i][j] = tmp;
	                sum += tmp;
	                sum_arr[j] += tmp;
	                ++j;
	            }
	            table[i][j] = sum;
	        }
	        int sum = 0;
	        for(int i=0;i<n;i++){
	            table[n][i] = sum_arr[i];
	            sum += sum_arr[i];
	        }
	        table[n][n] = sum;
	        
	        int length = Integer.toString(sum).length();
	        String fmt = "%" + length + "s";
	        for(int[] t:table){
	            int cnt = 0;
	            for(int val:t){
	                if(cnt>0){
    	                System.out.print(" ");
	                    cnt++;
	                }
	                System.out.print(String.format(fmt,Integer.toString(val)));
	            }
                System.out.println("");
	        }
            line = br.readLine();
	    }
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.lang.*;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.io.*;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: expected unqualified-id before 'public'
    5 | public class Main{
      | ^~~~~~
Language: C++

//#define scanf_s scanf
//#define sscanf_s sscanf
//#define gets_s gets
#include <stdio.h>
#include <string>
#include <iostream>
#include <math.h>
using namespace std;
#define MAX 11
#define HO 6
int main(void)
{
	int n;
	while (1) {
		scanf_s("%d", &n);
		if (n == 0) break;
		int date[MAX][MAX] = { 0 };
		for (int i = 0; i < n; ++i) {
			for (int j = 0; j < n; ++j) {
				scanf_s("%d", &date[i][j]);
				date[i][n] += date[i][j];
				date[n][j] += date[i][j];
				date[n][n] += date[i][j];
			}
		}
		for (int i = 0; i <= n; ++i) {
			for (int j = 0; j <= n; ++j) {
				printf("%5d", date[i][j]);
			}
			printf("\n");
		}
		
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   15 |                 scanf_s("%d", &n);
      |                 ^~~~~~~
      |                 scanf
Language: C++

#include <string>
#include <iostream>
#include <vector>
#include <sstream>
#include <memory>
#include <iomanip>

int main(int argc, char* argv[])
{
    while (true) {
        std::string line;
        std::stringstream buffer;
        getline(std::cin, line);
        buffer << line;
        size_t length = 0;
        buffer >> length;
        if (length == 0) break;
        int *total = new int[length + 1];
        size_t width = length + 1;
        memset(total, 0, sizeof(int) * width);
        for (size_t i = 0; i < length; ++i) {
            getline(std::cin, line);
            std::istringstream s(line);
            std::string element;
            int sum = 0;
            for (size_t n = 0; n < length; ++n) {
               getline(s, element, ' ');
               std::stringstream tmp;
                int val = 0;
                tmp << element;
                tmp >> val;
                sum += val;
                total[n] += val;
                std::cout << std::setw(5) << val;
            }
            std::cout << std::setw(5) << sum << std::endl;
            total[length] += sum;
        }
        for (size_t i = 0; i < width; ++i) {
            std::cout << std::setw(5) << total[i];
        }
        std::cout << std::endl;
        delete[] total;
    }
	return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:20:9: error: 'memset' was not declared in this scope
   20 |         memset(total, 0, sizeof(int) * width);
      |         ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    6 | #include <iomanip>
  +++ |+#include <cstring>
    7 |
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
int main(){
  int n,c;
  while(cin>>n,n){
    int a[n+1][n+1];
    rep(i,n){c=0;rep(j,n){
        cin>>a[i][j];
        c+=a[i][j];
      }
      a[i][n]=c;
    }
    rep(j,n){c=0;rep(i,n){
      c+=a[i][j];
    }
    a[n][j]=c;
  }
  rep(i,n+1){rep(i,n+1){cout<<a[i][j];}cout<<endl;}
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:36: error: 'j' was not declared in this scope
   19 |   rep(i,n+1){rep(i,n+1){cout<<a[i][j];}cout<<endl;}
      |                                    ^
Language: C++

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner s = new Scanner(System.in);
        int sub;
        int sum;
        int all;

        while(s.hasNext()){
            sub = s.nextInt();
            all = 0;
            if(sub == 0)
                break;
            int[][] table = new int[sub][sub];
            for(int i = 0; i < sub; i++){
                sum = 0;
                for(int j = 0; j < sub; j++){
                    table[i][j] = s.nextInt();
                    sum += table[i][j];
                    System.out.printf("%5d",table[i][j]);
                    if(j == sub - 1){
                        System.out.printf("%5d", sum);
                        System.out.println();
                    }
                }
            }

            for(int j = 0; j < sub; j++){
                sum = 0;
                for(int i = 0; i < sub; i++){
                    sum += table[i][j];
                }
                all += sum;
                System.out.printf("%5d", sum);
            }
            System.out.printf("%5d", all);
            System.out.println();
        }
        s.close();
    }

}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

#include <iostream>
#include<iomanip>

using namespace std;

int main() {
    
    int n;
    cin >> n;
    
    if(n == 0)
    break;
    
    int A[51][51] = {};
    
    for(int i=0;i<n;i++) { 
    for(int j=0;j<n;j++) {
    	
    	cin >> A[i][j];
    	
    	A[i][n] += A[i][j];
    	A[n][j] += A[i][j];
	}
	A[n][n] += A[i][n];
}

	for(int i=0;i<=n;i++) { 
    for(int j=0;j<=n;j++) {
    	
    	cout << setw(4)<< A[i][j] << " ";
    
	}
	cout << "\n";
}
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: break statement not within loop or switch
   12 |     break;
      |     ^~~~~
Language: C++

#include <cstdio>

int main(){
  int i,j,n,a[10][10],b[10],c[10],sum;
  while(1){

    scanf("%d",&n);
    if(n == 0) break;
    sum = 0;

    for(i=0;i<n;i++){
      b[i] = 0;
      for(j=0;j<n;j++){
	scanf("%d",&a[i][j]);
	b[i] += a[i][j];
	sum += a[i][j];
      }
    }
    for(i=0;i<n;i++){
      c[i] = 0;
      for(j=0;j<n;j++){
	c[i] += a[j][i];
      }
    }

    for(i=0;i<n;i++){
      for(j=0;j<n;j++){
	printf("%5d ",a[i][j]);
      }
      printf("%5d\n",b[i]);
    }
    for(i=0;i<n;i++){
      printf("%5d ",c[i]);
    }
    printf("%5d\n",sum);

  }
  return 0;
}
#include <cstdio>

int main(){
  int i,j,n,a[10][10],b[10],c[10],sum;
  while(1){

    scanf("%d",&n);
    if(n == 0) break;
    sum = 0;

    for(i=0;i<n;i++){
      b[i] = 0;
      for(j=0;j<n;j++){
	scanf("%d",&a[i][j]);
	b[i] += a[i][j];
	sum += a[i][j];
      }
    }
    for(i=0;i<n;i++){
      c[i] = 0;
      for(j=0;j<n;j++){
	c[i] += a[j][i];
      }
    }

    for(i=0;i<n;i++){
      for(j=0;j<n;j++){
	printf("%5d ",a[i][j]);
      }
      printf("%5d\n",b[i]);
    }
    for(i=0;i<n;i++){
      printf("%5d ",c[i]);
    }
    printf("%5d\n",sum);

  }
  return 0;
}

Compiler output:
a.cc:42:5: error: redefinition of 'int main()'
   42 | int main(){
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main(){
      |     ^~~~
Language: C++

#include <stdio.h>
#include <string.h>

int main(void) {

  int size;
  int matrix[10][10];

  int sum_row,sum_column,sum;
  char line[200];
  char* p;

  int i,j;
  char c;

  
  while(1) {

    scanf("%d",&size);
    c=getchar();

    if(size==0) break;

    for(i=0;i<size;i++) {

      fgets(line,sizeof(line),stdin);
      line[strlen(line)-1]='\0';

      p=strtok(line," ");
      matrix[i][0]=atoi(p);

      for(j=1;j<size;j++) {
	p=strtok(NULL," ");
	matrix[i][j]=atoi(p);
      }

    }

    for(i=0;i<size;i++) {
     
      sum_row=0;

      for(j=0;j<size;j++) {

	printf("%5d",matrix[i][j]);

	sum_row+=matrix[i][j];

      }

      printf("%5d\n",sum_row);
    }

    sum=0;

    for(j=0;j<size;j++) {

      sum_column=0;

      for(i=0;i<size;i++) {

	sum_column+=matrix[i][j];

      }

      sum+=sum_column;

      printf("%5d",sum_column);
    }

    printf("%5d\n",sum);

  }

  return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:20: error: 'atoi' was not declared in this scope
   30 |       matrix[i][0]=atoi(p);
      |                    ^~~~
Language: C++

#include <iostream>
#include <Iomanip>
using namespace std;

int main()
{
  int n;
  while(1)
    {
      cin>>n;
      if(n==0)break;
      int m[n][n];
      
      for(int i=0;i<n;i++)
	{
	  for(int j=0;j<n;j++)
	    {
	      cin>>m[i][j];
	    }
	}
      
      int gyousum=0,retusum=0,allsum=0;
      for(int i=0;i<n;i++)
	{
	  for(int j=0;j<n;j++)
	    {
	      cout<<setw(5)<<m[i][j];
	      gyousum+=m[i][j];
	      allsum+=m[i][j];
	    }
	  cout<<setw(5)<<gyousum<<"\n";
	  gyousum=0;
	}
      for(int i=0;i<n;i++)
	{
	  for(int j=0;j<n;j++)
	    {
	      retusum+=m[j][i];
	    }

	  cout<<setw(5)<<retusum;
	  retusum=0;
	}
      cout<<setw(5)<<allsum<<"\n";
      allsum=0;
      }
  return 0;
}

Compiler output:
a.cc:2:10: fatal error: Iomanip: No such file or directory
    2 | #include <Iomanip>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
using namespace std;
int main()
{
	int n, num[11][11];
	while (1) {
		if (cin >> n, !n) break;
		for (int i=0; i<11; i++) for (int j=0; j<11; j++) num[i][j] = 0;
		for (int i=0; i<n; i++)  for (int j=0; j<n; j++) cin >> num[i][j];
		for (int i=0; i<10; i++) for (int j=0; j<10; j++) num[10][i] += num[j][i];
		for (int i=0; i<11; i++)
			for (int j=0; j<10; j++) num[i][10] += num[i][j];

		for (int i=0; i<11; i++) {
			for (int j=0; j<11; j++) {if ((i<n && j<n) || (i==10 && j<n) || (j==10 && i<n) || (j==10 && i==10)) {cout.width(5); cout << num[i][j];}}
			if ((i < n) || (i == 10))  cout << endl;
		}
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:10: error: expected '}' at end of input
   18 |         }
      |          ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
    int n;
    while(cin>>n)
	{
        int table[11][11]={0};
        if(n==0)
			break;
        for(int i=0,in;i<n;++i)
		{
            for(int j=0;j<n;++j)
			{
                cin>>in;
                table[i][j]=in;
                table[n][j]+=in;
                table[i][n]+=in;
            }
        }
        for(int i=0;i<n;++i)table[n][n]+=table[n][i];
        for(int i=0;i<n+1;++i)
		{
            for(int j=0;j<n+1;++j)printf("%5d",table[i][j]);
            cout<<endl;
        }
    }
    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:29:14: error: expected '}' at end of input
   29 |     return 0;
      |              ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
    int n;
    while(cin>>n)
	{
        int table[11][11]={0};
        if(n==0)
			break;
        for(int i=0,in;i<n;++i)
		{
            for(int j=0;j<n;++j)
			{
                cin>>in;
                table[i][j]=in;
                table[n][j]+=in;
                table[i][n]+=in;
            }
        }
        for(int i=0;i<n;++i)table[n][n]+=table[n][i];
        for(int i=0;i<n+1;++i)
		{
            for(int j=0;j<n+1;++j)printf("%5d",table[i][j]);
            cout<<endl;
        }
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:2: error: expected '}' at end of input
   30 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include<iostream>
#include<iomanip>

int n;
int tbl[11][11];

int main()
{
	while( std::cin >> n, n )
	{
		memset( tbl, 0, sizeof( tbl ) );

		for( int i = 0; i != n; ++i )
		{
			for( int j = 0; j != n; ++j )
			{
				std::cin >> tbl[i][j];
	
				tbl[i][n] += tbl[i][j];
				tbl[n][j] += tbl[i][j];
				tbl[n][n] += tbl[i][j];
			}
		}

		for( int i = 0; i <= n; ++i )
		{
			for( int j = 0; j <= n; ++j )
				std::cout << std::setw( 5 ) << std::right << tbl[i][j];	
	
			std::cout << std::endl;
		}
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'memset' was not declared in this scope
   11 |                 memset( tbl, 0, sizeof( tbl ) );
      |                 ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<iomanip>
  +++ |+#include <cstring>
    3 |
Language: C++

#include<iostream>

int main(){
	int n;
	while(std::cin>>n,n){
		int data[5][5];
		memset(data,0,sizeof(data));
		for(int i=0;i<4;i++){
			for(int j=0;j<4;j++){
				std::cin>>data[i][j];
				data[i][4]+=data[i][j];
				data[4][j]+=data[i][j];
				data[4][4]+=data[i][j];
			}
		}
		for(int i=0;i<5;i++){
			for(int j=0;j<5;j++){
				std::cout<<data[i][j]<<" ";
			}
			std::cout<<std::endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 'memset' was not declared in this scope
    7 |                 memset(data,0,sizeof(data));
      |                 ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 |
Language: C++

4
52 96 15 20
86 22 35 45
45 78 54 36
16 86 74 55
4
52 96 15 20
86 22 35 45
45 78 54 36
16 86 74 55
0

Compiler output:
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 4
      | ^
Language: Java

import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	 	int p,r,a;
	  	int n = sc.nextInt();
	  	for(int i=0; i<n; i++){
			a=0;r=0;p=0;
			while(a<3){
				String t = sc.next();
				if(t.equal("HIT")){
					r++;
					if(r>3) {r--;p++;}
				} else if(t.equal("OUT")){
					a++;
				} else {
					p+=r+1;
					r=0:
				}
			}
			System.out.println(p);
	  	}
	}
}

Compiler output:
Main.java:18: error: ';' expected
					r=0:
					   ^
1 error
Language: Java

import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	 	int p,r,a;
	  	int n = sc.nextInt();
	  	for(int i=0; i<n; i++){
			a=0;r=0;p=0;
			while(a<3){
				String t = sc.next();
				if(t.equal("HIT")){
					r++;
					if(r>3) {r--;p++;}
				} else if(t.equal("OUT")){
					a++;
				} else {
					p+=r+1;
					r=0;
				}
			}
			System.out.println(p);
	  	}
	}
}

Compiler output:
Main.java:11: error: cannot find symbol
				if(t.equal("HIT")){
				    ^
  symbol:   method equal(String)
  location: variable t of type String
Main.java:14: error: cannot find symbol
				} else if(t.equal("OUT")){
				           ^
  symbol:   method equal(String)
  location: variable t of type String
2 errors