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

import java.util.*;

public class Main{
    public static void main(String[] args)throw IOException{
        
        Scanner input = new Scanner(System.in);
        int[] s = new int[111];
        int r = input.nextInt();
        int c = input.nextInt();
        int t, sum;
        for(int i = 0; i < r; i++)
        {
            sum = 0;
            for(int k = 0; k < c; k++)
            {
                t = input.nextInt();
                sum += t;
                s[k] += t;
                System.out.print(t + " ");
            }
            s[c] += sum;
            System.out.println(sum);
        }
        for(int i = 0; i < c; i++)
            System.out.print(s[i] + " ");
        System.out.println(s[c]);
    }
}

Compiler output:
Main.java:4: error: ';' expected
    public static void main(String[] args)throw IOException{
                                          ^
1 error
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);
		int r = scan.nextInt();
		int c = scan.nextInt();
		int[][] table = new int[r + 1][c + 1];
		int[] sumR = new int[c + 1];

		for(int i = 0; i < r; i++){
			for(int j = 0; j < c; j++){
				int n = scan.nextInt();
				table[i][j] = n;
			}
		}
		
		int sumC = 0;
		for(int i = 0; i < r + 1; i++){
			for(int j = 0; j < c + 1; j++){
				if(i != r){
					sumR[j] += table[i][j];
					if(j != c){
						sumC += table[i][j];
					} else{
						table[i][j] = sumC;
					}
				} else{
					table[i][j] =sumR[j];
				}
			}
			
		}
	}

	for(int i = 0; i < r + 1; i++){
		for(int j = 0; j < c + 1; j++){
			if(j != c){
				System.out.printf("%d ", table[i][j]);
			} else{
				System.out.printf("%d\n", table[i][j]);
			}
		}
	}
}

Compiler output:
Main.java:37: error: illegal start of type
	for(int i = 0; i < r + 1; i++){
	^
Main.java:37: error: > or ',' expected
	for(int i = 0; i < r + 1; i++){
	                     ^
Main.java:37: error: <identifier> expected
	for(int i = 0; i < r + 1; i++){
	                           ^
3 errors
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);
		int r = scan.nextInt();
		int c = scan.nextInt();
		int[][] table = new int[r + 1][c + 1];
		int sum = 0;

		for(int i = 0; i < r; i++){
			for(int j = 0; j < c; j++){
				int n = scan.nextInt();
				table[i][j] = n;
				table[i][c] += n;
				talbe[r][j] += n:
				sum += n;
			}
		}
		table[r][c] = sum;

		for(int i = 0; i < r + 1; i++){
			for(int j = 0; j < c + 1; j++){
				System.out.printf((j != c) ? "%d " : "%d\n", table[i][j]);
			}
		}
	}
}

Compiler output:
Main.java:17: error: ';' expected
				talbe[r][j] += n:
				                ^
1 error
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);
		int r = scan.nextInt();
		int c = scan.nextInt();
		int[][] table = new int[r + 1][c + 1];
		int sum = 0;

		for(int i = 0; i < r; i++){
			for(int j = 0; j < c; j++){
				int n = scan.nextInt();
				table[i][j] = n;
				table[i][c] += n;
				table[r][j] += n:
				sum += n;
			}
		}
		table[r][c] = sum;

		for(int i = 0; i < r + 1; i++){
			for(int j = 0; j < c + 1; j++){
				System.out.printf((j != c) ? "%d " : "%d\n", table[i][j]);
			}
		}
	}
}

Compiler output:
Main.java:17: error: ';' expected
				table[r][j] += n:
				                ^
1 error
Language: Java

mport java.util.*;

public class Main{
	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);
		int r = scan.nextInt();
		int c = scan.nextInt();
		int[][] table = new int[r + 1][c + 1];
		int[] sumC = new int[c + 1];

		for(int i = 0; i < r ; i++){
			for(int j = 0; j < c; j++){
				int n = scan.nextInt();
				table[i][j] = n;
			}
		}

		for(int i = 0; i < r + 1; i++){
			int sum = 0;
			for(int j = 0; j < c + 1; j++){
				if(i != r){
					if(j != c){
						sum = sum + table[i][j];
						sumC[j] = sumC[j] + table[i][j];
					} else if(j == c){
						table[i][c] = sum;
						sumC[c] = sumC[c] + table[i][c];
					}
				} else if(i == r){
					table[r][j] = sumC[j];
				}
			}
		}

		for(int i = 0; i < r + 1; i++){
			for(int j = 0; j < c + 1; j++){
				System.out.printf((j != c) ? "%d " : "%d\n", table[i][j]);
			}
		}
	}
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.*;
^
1 error
Language: Java

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

public final class Spreadsheet {

	public static void main(String[] args) 
	throws IOException {
		// TODO Auto-generated method stub

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int[] arraysize = TempReaderCall.splitIntArrayFromString(TempReaderCall.getStdInRead(br));
		
		int[] ctotal = new int[arraysize[1]];
		ArrayList<String> list = TempReaderCall.getStdInReadlines(br, arraysize[0]);
		
		for (int i=0; i<arraysize[0]; i++){
			int[] rowdata = TempReaderCall.splitIntArrayFromString(list.get(i));
			addColumnData(ctotal, rowdata);
			System.out.println(list.get(i) + " " + sum(rowdata));
		}
		
		System.out.println(printRow(ctotal) + sum(ctotal));
		
	}
	
	static int sum (int[] data){
		int total = 0;
		for(int i=0; i < data.length; i++)
			total += data[i];
		
		return total;
	}
	
	static void addColumnData(int[] ctotal, int[] rowdata){
		for(int i=0; i<ctotal.length; i++)
			ctotal[i] += rowdata[i];
	}
	
	static String printRow(int[] ctotal){
		String line = "";
		for(int i=0; i < ctotal.length; i++) 
			line = line + Integer.toString(ctotal[i]) + " ";
		return line;
	}

}


class TempReaderCall{
	
	static ArrayList<String> getStdInReadlines(BufferedReader br, int line) throws IOException {
		ArrayList<String> list = new ArrayList<String>();
		for (int i = 0; i < line; i++)
			list.add(br.readLine());
		return list;
	}
	
	static String getStdInRead(BufferedReader br) throws IOException {
		return (br.readLine());
	}
	
	
	static int[] splitIntArrayFromString(String st) {
		String[] sts = st.split(" ");
		int[] data = new int[sts.length];
		
		for (int i=0;i<sts.length;i++){
			data[i] = Integer.parseInt(sts[i]);
		}
		
		return data;
	}
}

Compiler output:
Main.java:6: error: class Spreadsheet is public, should be declared in a file named Spreadsheet.java
public final class Spreadsheet {
             ^
1 error
Language: Java

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

public class Hyoukeisan {
    public static void main(String[] args) throws Exception {
        // Here your code !
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] line = br.readLine().split(" ");

        int num1 = Integer.parseInt(line[0]);
        int num2 = Integer.parseInt(line[1]);
        ArrayList<Integer> aryNum = new ArrayList<Integer>();
        int[] totalCol = new int[num2];

        for(int i = 0; i < num1; i++){
        	String[] input = br.readLine().split(" ");
        	int total = 0;
        	for(int j = 0; j < num2; j++){
        		total += Integer.parseInt(input[j]);
        		aryNum.add(Integer.parseInt(input[j]));
        		totalCol[j] += Integer.parseInt(input[j]);
        	}
        	aryNum.add(total);
        }

        int count = 1;
        int lastTotal = 0;
        for(int num : aryNum){

        	System.out.print(num);
        	if(count % (num2 + 1) == 0){
        		lastTotal += num;
        		System.out.println();
        	}else{
        		System.out.print(" ");
        	}
        	count++;
        }

        for(int num : totalCol){
        	System.out.print(num + " ");
        }
        System.out.println(lastTotal);

    }
}

Compiler output:
Main.java:5: error: class Hyoukeisan is public, should be declared in a file named Hyoukeisan.java
public class Hyoukeisan {
       ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class TEST {

	public static void main(String[] args) throws IOException {



		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String[] imput = br.readLine().split(" ");
		int r = Integer.parseInt(imput[0]);
		int c = Integer.parseInt(imput[1]);
		int[][] data = new int[r+1][c+1];
		int[] sumR = new int[c];
		int[] sumC = new int[r];
		int sumX = 0;
		int sumA =0;
		int cnt=0;

		for(int i=0;i<r;i++){
			String[] str = br.readLine().split(" ");
			for(int j=0;j<c;j++){
				//System.out.println(str[j]);
				data[i][j] = Integer.parseInt(str[j]);

			}
		}

		for(int i=0;i<r;i++){
			
			for(int j=0;j<c;j++){
				sumA += data[i][j];
				sumX += data[i][j];
				//System.out.println(sumX);
				if(j == c-1){
					data[i][c]=sumX;
					sumX=0;
				}
			}//System.out.print(data[r][i]+" ");
			
			for(int j=0;j<c;j++){
				
				data[r][j] += data[i][j];
				
				
			}
			
		}
		
		//System.out.println(sumA);
		
		for(int i=0;i<r+1;i++){
			for(int j=0;j<c+1;j++){
				
				if(i==r&&j==c){
					System.out.print(sumA);
				}else{
					System.out.print(data[i][j]);
					if(j!=c){
						System.out.print(" ");
					}
				}

			}System.out.println();
		}

	}
}

Compiler output:
Main.java:5: error: class TEST is public, should be declared in a file named TEST.java
public class TEST {
       ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
 
class Main{
  public static void main(String args[]) throws IOException{
   
   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
   String[] token = br.readLine().split(" ");
   int r = Integer.parseInt(token[0]);      
   int c = Integer.parseInt(token[1]);   

   for(int i = 0;i < r; i++){
      String[] token = br.readLine().split(" ");
      int sum = 0;
      for(int j = 0;j < c; j++){      
        System.out.print(token[j] + " ");
        sum += Integer.parseInt(token[j]);
      }
      System.out.println(sum);
   }
    
  }
}

Compiler output:
Main.java:14: error: variable token is already defined in method main(String[])
      String[] token = br.readLine().split(" ");
               ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
 
class Main{
  public static void main(String args[]) throws IOException{
   
   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
   String[] token = br.readLine().split(" ");
   int r = Integer.parseInt(token[0]);      
   int c = Integer.parseInt(token[1]);   
   int[] Columnsum = new int[c]; 
  ???
   for(int i = 0;i < r; i++){
      String[] token2 = br.readLine().split(" ");
      int sum = 0;
      for(int j = 0;j < c; j++){      
        System.out.print(token2[j] + " ");
        sum += Integer.parseInt(token2[j]);
      }
      System.out.println(sum);
   }




    
  }
}

Compiler output:
Main.java:13: error: illegal start of expression
  ???
  ^
Main.java:13: error: illegal start of expression
  ???
   ^
Main.java:13: error: illegal start of expression
  ???
    ^
Main.java:14: error: illegal start of expression
   for(int i = 0;i < r; i++){
   ^
4 errors
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
 
class Main{
  public static void main(String args[]) throws IOException{
   
   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
   String[] token = br.readLine().split(" ");
   int r = Integer.parseInt(token[0]);      
   int c = Integer.parseInt(token[1]);   
   int[] Columnsum = new int[c];
   int totalsum = 0;  
   Columsum = 0;
   
  
   for(int i = 0;i < r; i++){
      String[] token2 = br.readLine().split(" ");
      int sum = 0;
      for(int j = 0;j < c; j++){      
        System.out.print(token2[j] + " ");
        sum += Integer.parseInt(token2[j]);
      }
      totalsum += sum;
      System.out.println(sum);
   }




    
  }
}

Compiler output:
Main.java:14: error: cannot find symbol
   Columsum = 0;
   ^
  symbol:   variable Columsum
  location: class Main
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
 
class Main{
  public static void main(String args[]) throws IOException{
   
   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
   String[] token = br.readLine().split(" ");
   int r = Integer.parseInt(token[0]);      
   int c = Integer.parseInt(token[1]);   
   int[] Columnsum = new int[c];
   int totalsum = 0;  
   Columsum[] = 0;
   
  
   for(int i = 0;i < r; i++){
      String[] token2 = br.readLine().split(" ");
      int sum = 0;
      for(int j = 0;j < c; j++){      
        System.out.print(token2[j] + " ");
        sum += Integer.parseInt(token2[j]);
      }
      totalsum += sum;
      System.out.println(sum);
   }




    
  }
}

Compiler output:
Main.java:14: error: not a statement
   Columsum[] = 0;
           ^
Main.java:14: error: ';' expected
   Columsum[] = 0;
             ^
2 errors
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
 
class Main{
  public static void main(String args[]) throws IOException{
   
   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
   String[] token = br.readLine().split(" ");
   int r = Integer.parseInt(token[0]);      
   int c = Integer.parseInt(token[1]);   
   int[] Columnsum = new int[c];
   int totalsum = 0;  
   Columsum[] = {0};
   
  
   for(int i = 0;i < r; i++){
      String[] token2 = br.readLine().split(" ");
      int sum = 0;
      for(int j = 0;j < c; j++){      
        System.out.print(token2[j] + " ");
        sum += Integer.parseInt(token2[j]);
      }
      totalsum += sum;
      System.out.println(sum);
   }




    
  }
}

Compiler output:
Main.java:14: error: not a statement
   Columsum[] = {0};
           ^
Main.java:14: error: ';' expected
   Columsum[] = {0};
             ^
Main.java:14: error: not a statement
   Columsum[] = {0};
                 ^
Main.java:14: error: ';' expected
   Columsum[] = {0};
                  ^
4 errors
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
 
class Main{
  public static void main(String args[]) throws IOException{
   
   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
   String[] token = br.readLine().split(" ");
   int r = Integer.parseInt(token[0]);      
   int c = Integer.parseInt(token[1]);   
   int[] Columnsum = new int[c];
   int totalsum = 0;  
   Columsum[c] = {0};
   
  
   for(int i = 0;i < r; i++){
      String[] token2 = br.readLine().split(" ");
      int sum = 0;
      for(int j = 0;j < c; j++){      
        System.out.print(token2[j] + " ");
        sum += Integer.parseInt(token2[j]);
      }
      totalsum += sum;
      System.out.println(sum);
   }




    
  }
}

Compiler output:
Main.java:14: error: illegal start of expression
   Columsum[c] = {0};
                 ^
Main.java:14: error: not a statement
   Columsum[c] = {0};
                  ^
Main.java:14: error: ';' expected
   Columsum[c] = {0};
                   ^
3 errors
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
 
class Main{
  public static void main(String args[]) throws IOException{
   
   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
   String[] token = br.readLine().split(" ");
   int r = Integer.parseInt(token[0]);      
   int c = Integer.parseInt(token[1]);   
   int[] Columnsum = new int[c];
   int totalsum = 0;  
   for(int k = 0;k < c; k++){      
        Columnsum[k] = 0;
   }
   
  
   for(int i = 0;i < r; i++){
      String[] token2 = br.readLine().split(" ");
      int sum = 0;
      for(int j = 0;j < c; j++){      
        System.out.print(token2[j] + " ");
        Columnsum[j] += token2[j];
        sum += Integer.parseInt(token2[j]);
      }
      totalsum += sum;
      System.out.println(sum);
   }

   for(int l = 0;l < c; l++){      
        System.out.print(Columnsum[l] + " ");
   }
   System.out.println(totalsum);

    
  }
}

Compiler output:
Main.java:24: error: incompatible types: String cannot be converted to int
        Columnsum[j] += token2[j];
                              ^
1 error
Language: Java

 public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
    	int r = scan.nextInt();
    	int c = scan.nextInt();
    	int[][] num = new int[r + 1][c + 1];
    	
    	for(int i = 0; i < r; i++){
    		for(int j = 0; j < c; j++){
        		num[i][j] = scan.nextInt();
        	}
    	}
    	
    	for(int i = 0; i < r; i++){
    		for(int j = 0; j < c; j++){
    			num[i][c] += num[i][j];
    		}
    	}
    	for(int j = 0; j < c + 1; j++){
    		for(int i = 0; i < r; i++){
    			num[r][j] += num[i][j];
    		}
    	}
    	
    	for(int i = 0; i < r + 1; i++){
    		for(int j = 0; j < c + 1; j++){
    			if(j != c){
    				System.out.print(num[i][j] + " ");
    			}else{
    				System.out.println(num[i][j]);
    			}
    		}
    	}
    }

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
 public static void main(String[] args){
               ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

import java.util.Scanner;

public class Itp7_c {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		
		//?????¨?¨????????????????????????????
		String s  = sc.nextLine();
		String [] ary = s.split(" ");
		int height = Integer.parseInt(ary[0]);
		int width = Integer.parseInt(ary[1]);
		
		//?????±????????????????´???????
		int [][] data = new int[height][width];
 		for(int i = 0; i < height; i++) {
			String strData  = sc.nextLine();
			String[] dataAry = strData.split(" ");
			for(int j = 0; j < width; j++) {
				data[i][j] = Integer.parseInt(dataAry[j]);
			}
		}
 		
 		//??\?????????????????±?????¨?????????
 		int sumG = 0;
 		for(int i = 0; i < data.length; i++) {
 			int sum = 0;
 			for(int j = 0; j <data[i].length; j++) {
 				System.out.print(data[i][j] + " ");
 				sum += data[i][j];
 			}
 			System.out.println(sum);
 		}
 		
 		//????¨??????¨?????????
 		for(int i = 0; i < width; i++) {
 			int sum = 0;
 			for(int j = 0; j < height; j++) {
 				sum += data[j][i];
 			}
 			sumG += sum;
 			System.out.print(sum + " ");
 		}
 		System.out.println(sumG);
 		
	}

}

Compiler output:
Main.java:3: error: class Itp7_c is public, should be declared in a file named Itp7_c.java
public class Itp7_c {
       ^
1 error
Language: Java

import java.util.Scanner;

public class Maint {
	public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	
	int r = sc.nextInt();             //?????????????????§???
	int c = sc.nextInt();             //?????????????????§???
	int[][] num = new int[r+1][c+1] ; //??\?????????????????§???
	
	for(int i = 0; i < r ; i++) {
		for(int j = 0; j < c ; j++) {
		   num[i][j] = sc.nextInt();
		   
		   num[i][c] += num[i][j];  //?????°???????¨???§???
		   num[r][j] += num[i][j];  //?????°???????¨???§???
		   if(i < r & j < c)
		   num[r][c] += num[i][j];  //?????????????????°???????¨???§???
		   
		}
	 }
	
	
//???????????????????????????????????????	
	for(int i = 0; i < r+1 ; i++) {
		for(int j = 0; j < c+1 ; j++) {
			System.out.print(num[i][j] + " ");
		}
		System.out.println();
	}
   sc.close();	
  }

}

Compiler output:
Main.java:3: error: class Maint is public, should be declared in a file named Maint.java
public class Maint {
       ^
1 error
Language: Java


import java.util.Scanner;

public class ren {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int r = sc.nextInt();
		int c = sc.nextInt();
		int[][] arrayInput = new  int[r][c];

		int x = r+1;
		int y = c+1;

		int[][] arrayOutput = new  int[x][y];


		//?????????????????\???????????????
		for(int i = 0; i < r; i++) {
			for(int j = 0; j < c; j++) {
				arrayInput[i][j] = sc.nextInt();
			}
		}


		//??????????¨?????±???????
		int Sum = 0;
		int Num = 0;
		for(int i = 0; i < x; i++) {
			for(int j = 0; j < y; j++) {

				if(!(i+1 == x) && !( j+1 == y )) {
					arrayOutput[i][j] = arrayInput[i][j];
				}

				else if(j+1 == y) {
					for(int k=0; k < y-1; k++) {
						Num = arrayOutput[i][k];
						Sum = Sum + Num;
					}
					arrayOutput[i][j] = Sum;
					Num = 0;
					Sum = 0;
				}
			}
		}

		//??????????¨?????±???????
				int Sum1 = 0;
				int Num1 = 0;
				for(int j = 0; j < y; j++) {
					for(int i = 0; i < x; i++) {

						if(i+1 == x) {
							for(int k=0; k < x-1; k++) {
								Num1 = arrayOutput[k][j];
								Sum1 = Sum1 + Num1;
							}
							arrayOutput[i][j] = Sum1;
							Num1 = 0;
							Sum1 = 0;
						}
					}
				}

		//?????????????????????
		for(int i = 0; i < x; i++) {
			for(int j = 0; j < y; j++) {

				if(j+1 == y) {
					System.out.print(arrayOutput[i][j]);
				}
				else {
					System.out.print(arrayOutput[i][j]+" ");
				}

			}
			System.out.println("");
		}


	}
}

Compiler output:
Main.java:4: error: class ren is public, should be declared in a file named ren.java
public class ren {
       ^
1 error
Language: Java

import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int r = sc.nextInt();
		int c = sc.nextInt();
		int[][] sheet = new int[r+1][c+1];
	//in	
		for(int i=0;i<r;i++){
			String[] line = sc.nextLine().spilt(" ");
			int sum=0;
			for(int j=0;j<c;j++){
				sheet[i][j]=Integer.parseInt(line[j]);
				sum = sum+sheet[i][j]
			}
			sheet[i][c]=sum;
		}	
		for(int i=0;i<c+1;i++){
			int sum=0;
			for(int j=0;j<r;j++){
				sum+=sheet[j][i];
			}
			sheet[r][i]=sum;
		}
	//out
		for(int i=0;i<r+1;i++){
			for(int j=0;j<c+1;j++){
				System.out.print(sheet[i][j]+" ");
			}
			System.out.println();
		}
	}
}

Compiler output:
Main.java:15: error: ';' expected
				sum = sum+sheet[i][j]
				                     ^
1 error
Language: Java

import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int r = sc.nextInt();
		int c = sc.nextInt();
		int[][] sheet = new int[r+1][c+1];
	//in	
		for(int i=0;i<r;i++){
			String[] line = sc.nextLine().spilt(" ");
			int sum=0;
			for(int j=0;j<c;j++){
				sheet[i][j]=Integer.parseInt(line[j]);
				sum = sum+sheet[i][j];
			}
			sheet[i][c]=sum;
		}	
		for(int i=0;i<c+1;i++){
			int sum=0;
			for(int j=0;j<r;j++){
				sum+=sheet[j][i];
			}
			sheet[r][i]=sum;
		}
	//out
		for(int i=0;i<r+1;i++){
			for(int j=0;j<c+1;j++){
				System.out.print(sheet[i][j]+" ");
			}
			System.out.println();
		}
	}
}

Compiler output:
Main.java:11: error: cannot find symbol
			String[] line = sc.nextLine().spilt(" ");
			                             ^
  symbol:   method spilt(String)
  location: class String
1 error
Language: Java

import java.io.ByteArrayInputStream;
import java.io.PrintWriter;
import java.util.Scanner;

public class Main {

    String INPUT = "";

    public static void main(String[] args) throws Exception {
        new Main().run();
    }

    void run() {
        Scanner sc = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(new ByteArrayInputStream(INPUT.getBytes()));
        PrintWriter out = new PrintWriter(System.out);

        solve(sc, out);
        out.flush();
    }

    void solve(Scanner sc, PrintWriter out) {
        int r,c;
        
        r = sc.nextInt();
        c = sc.nextInt();
        
        int mat[][] = new int[r][c];
        
        for (int i = 0; i < r; i++) {
			for (int j = 0; j < c; j++) {
				mat[i][j] = sc.nextInt();
			}
		}
	
		for (int i = 0; i < r; i++) {
        	int sum = 0;
			for (int j = 0; j < c; j++) {
				System.out.print(mat[i][j] + " ");
				sum += mat[i][j];
			}
			System.out.println(sum);
		}
		for (int j = 0; j < c; j++) {
        	int sum = 0;
        	for (int i = 0 i < r; i++) {
        		sum += mat[i][j];
			}
			System.out.print(sum + " ");
		}
		
		int sum = 0;
		for (int i = 0; i < r; i++) {
			for (int j = 0; j < c; j++) {
				sum += mat[i][j];
			}
		}
		System.out.println(sum);
    }
}



Compiler output:
Main.java:45: error: ';' expected
        	for (int i = 0 i < r; i++) {
        	              ^
1 error
Language: Java

import java.util.Scanner;

class Main {
  public static void main(String args[]) {
	  	Scanner scanner = new Scanner(System.in);
	  	int  r = scanner.nextInt();
	  	int  c = scanner.nextInt();
	  	int[][] array;//配列確保
        array = new int[r + 5][c + 5];
        
        //初期化
        for (int i = 0; i <= r; i++) {
        	for (int j = 0; j <= c; j++) {
        		array[i][j] = 0;
	        }
        }
        // データ入力
        for (int i = 0; i < r; i++) {
        	for (int j = 0; j < c; j++) {
        		array[i][j] = scanner.nextInt();
	        }
        }
        
        // データ補完
        for (int i = 0; i <= r; i++) {
        	for (int j = 0; j <= c; j++) {
	            if( j < c ) {
	            	array[i][c] += array[i][j];
	            	count += array[i][j];
	            }
		            
	            if( i < r ) {
	            	array[r][j] += array[i][j];
	            	count += array[i][j];
	            }

	            if( i == r && j == c )
	        	  	array[r][c] /= 2;
	            
        	}
        }
        
        for (int i = 0; i <= r; i++) {
        	for (int j = 0; j <= c; j++) {
	            System.out.print(" " + array[i][j]);
	        }
            System.out.print("\n");
        }
        scanner.close();
  }
}


Compiler output:
Main.java:29: error: cannot find symbol
	            	count += array[i][j];
	            	^
  symbol:   variable count
  location: class Main
Main.java:34: error: cannot find symbol
	            	count += array[i][j];
	            	^
  symbol:   variable count
  location: class Main
2 errors
Language: Java

import java.util.Scanner;
public class ITP1_7_B {
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
         
        int r = stdIn.nextInt();
        int c = stdIn.nextInt();
         
        int[][] h = new int[r+1][c+1];
         
        for(int i = 0; i < r; i++) {
            int rsum = 0;
            for(int j = 0; j < c; j++) {
                int tmp = stdIn.nextInt();
                rsum += tmp;
                h[i][j] = tmp;
            }
            h[i][c] = rsum;
        }
         
        for(int i = 0; i < c+1; i++) {
            int rsum = 0;
            for(int j = 0; j < r; j++) {
                rsum += h[j][i];
            }
            h[r][i] = rsum;
        }
         
        for(int i = 0; i < r+1; i++) {
            for(int j = 0; j < c; j++) {
                System.out.print(h[i][j] + " ");
            }
            System.out.println(h[i][c]);
        }
    }
}


Compiler output:
Main.java:2: error: class ITP1_7_B is public, should be declared in a file named ITP1_7_B.java
public class ITP1_7_B {
       ^
1 error
Language: Java

package aoj0103;

import java.util.Scanner;


public class　Main{

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int r,c,i=0,j=0,d=0;
		int sum=0;

		r = sc.nextInt();
		c = sc.nextInt();
		int table[][] = new int[r+1][c+1];

		for(i=0;i<r;i++){
			sum = 0;
			for(j=0;j<c;j++){
				table[i][j] = sc.nextInt();
				sum += table[i][j];
			}
			table[i][j] = sum;
			d += sum;
		}
		for(i=0;i<c;i++){
			sum = 0;
			for(j=0;j<r;j++){
				sum += table[j][i];
			}
			table[j][i] = sum;
			d += sum;
		}
		table[j][i] = d;
		for(i=0;i<=r;i++){
			for(j=0;j<=c;j++){
				System.out.print(table[i][j]+" ");
			}
			System.out.println();
		}
	}

}


Compiler output:
Main.java:6: error: illegal character: '\u3000'
public class?Main{
            ^
1 error
Language: Java

import java.util.Scanner;


public class AOJ0103 {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int r,c,i=0,j=0,d=0;
		int sum=0;

		r = sc.nextInt();
		c = sc.nextInt();
		int table[][] = new int[r+1][c+1];

		for(i=0;i<r;i++){
			sum = 0;
			for(j=0;j<c;j++){
				table[i][j] = sc.nextInt();
				sum += table[i][j];
			}
			table[i][j] = sum;
			d += sum;
		}
		for(i=0;i<c;i++){
			sum = 0;
			for(j=0;j<r;j++){
				sum += table[j][i];
			}
			table[j][i] = sum;
		}
		table[j][i] = d;
		for(i=0;i<=r;i++){
			for(j=0;j<=c;j++){
				System.out.print(table[i][j]);
				if(r==i && c ==j){
					break;
				}
				System.out.print(" ");
				
			}
			
			if(i<=r){
				System.out.println();
			}
			
			sc.close();
		}
	}

}


Compiler output:
Main.java:4: error: class AOJ0103 is public, should be declared in a file named AOJ0103.java
public class AOJ0103 {
       ^
1 error
Language: Java

import java.util.Scanner;
public class Main{
	public static void main(String[] args) {
	    Scanner sc = new Scanner(System.in);
	    int r=sc.nextInt();
	    int c=sc.nextInt();
	    int data[][]=new int[101][101];
	    for(int i=0;i<r;i++){
	        for(int j=0;j<c;j++){
	            data[i][j]=sc.nextInt();
	            data[i][c]+=data[i][j];
	            data[r][j]+=data[i][j];
	        }
	        data[r][c]+=data[i][c];
	    }
	    for(int i=0;i<=r;i++){
	        for(int j=0;j<=c;j++){
	            System.out.print(data[i][j]);
	            if(i!=r)System.out.print(+" ");
	        }
	        if(i!=r)System.out.println("");
	    }
	    sc.close();
	}
}




Compiler output:
Main.java:19: error: bad operand type String for unary operator '+'
	            if(i!=r)System.out.print(+" ");
	                                     ^
1 error
Language: Java

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int r = sc.nextInt();
		int c = sc.nextInt();
		int[][] sheets = new int[r + 1][c + 1];

		int sum = 0;
		for (int i = 0; i < r; i++) {
			for (int j = 0; j < c; j++) {
				int n = sc.nextInt();
				sheets[i][j] = n;
				sheets[r][j] += n;
				sheets[i][c] += n;
				sum += n;
			}
		}

		sheets[r][c] = sum;
		for (int i = 0; i <= r; i++) {
			for (int j = 0; j <= c; j++) {
				System.out.printf(j < c ? "%d " : "%d%n", sheets[i][j]);
			}
		}
	}



Compiler output:
Main.java:28: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int r=sc.nextInt();
		int c=sc.nextInt();
		int[][] cell=new int[r+1][c+1];
		for(int i=0; i<r; i++) {
			int sum=0;
			for(int j=0; j<c; j++) {
				cell[i][j]=sc.nextInt();
				sum+=cell[i][j];
				cell[r][j]+=cell[i][j];
			}
			cell[i][c]=sum;
			int total_sum;
			total_sum+=sum;
		}
		cell[r][c]=total_sum;
		
		for(int i=0; i<r; i++) {
			for(int j=0; j<c; j++) {
				System.out.printf("%d ", cell[i][j]);
			}
			System.out.printf("%d", cell[i][c]);
			System.out.println();
		}
	}
}



Compiler output:
Main.java:20: error: cannot find symbol
		cell[r][c]=total_sum;
		           ^
  symbol:   variable total_sum
  location: class Main
1 error
Language: Java

#include <stdio.h>

int main(int argc, char const *argv[])
{
	int table[100+1][100+1]={};
	int r, c;
	int i, j;


	scanf("%d %d", &r, &c);

	for(i=0; i<r; i++) {
		for(j=0; j<c; j++) {
			scanf("%d", &table[i][j]);
			table[i][c] += table[i][j];
		}
	}

	for(j=0; j<=c; j++) {
		for(i = 0; i<r; i++) {
			table[r][j] += table[i][j];
		}
	}



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

	return 0;
}


Compiler output:
Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
         ^
Main.java:6: error: class, interface, enum, or record expected
	int r, c;
	^
Main.java:7: error: class, interface, enum, or record expected
	int i, j;
	^
Main.java:10: error: class, interface, enum, or record expected
	scanf("%d %d", &r, &c);
	^
Main.java:12: error: class, interface, enum, or record expected
	for(i=0; i<r; i++) {
	^
Main.java:12: error: class, interface, enum, or record expected
	for(i=0; i<r; i++) {
	         ^
Main.java:12: error: class, interface, enum, or record expected
	for(i=0; i<r; i++) {
	              ^
Main.java:13: error: class, interface, enum, or record expected
		for(j=0; j<c; j++) {
		         ^
Main.java:13: error: class, interface, enum, or record expected
		for(j=0; j<c; j++) {
		              ^
Main.java:15: error: class, interface, enum, or record expected
			table[i][c] += table[i][j];
			^
Main.java:16: error: class, interface, enum, or record expected
		}
		^
Main.java:19: error: class, interface, enum, or record expected
	for(j=0; j<=c; j++) {
	         ^
Main.java:19: error: class, interface, enum, or record expected
	for(j=0; j<=c; j++) {
	               ^
Main.java:20: error: class, interface, enum, or record expected
		for(i = 0; i<r; i++) {
		           ^
Main.java:20: error: class, interface, enum, or record expected
		for(i = 0; i<r; i++) {
		                ^
Main.java:22: error: class, interface, enum, or record expected
		}
		^
Main.java:27: error: class, interface, enum, or record expected
	for(i=0; i<=r; i++) {
	         ^
Main.java:27: error: class, interface, enum, or record expected
	for(i=0; i<=r; i++) {
	               ^
Main.java:28: error: class, interface, enum, or record expected
		for(j=0; j<=c; j++) {
		         ^
Main.java:28: error: class, interface, enum, or record expected
		for(j=0; j<=c; j++) {
		               ^
Main.java:30: error: class, interface, enum, or record expected
		}
		^
Main.java:32: error: class, interface, enum, or record expected
	}
	^
Main.java:35: error: class, interface, enum, or record expected
}
^
24 errors
Language: C

#include <stdio.h>

int main(void)
{
    int r, c;
    int i, j, k, l, m, n;

    //input
    scanf("%d%d", &r, &c);
    if (r < 1 || 100 < r || c < 1 || 100 < c) return 1;

    for (i = 0; i <= r; i++) {
        for (j = 0; j <= c; j++) {
            a[i][j] = 0;
        }
    }

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

    
    putchar('\n');
    for (i = 0; i < r; i++) {
        for (j = 0; j < c; j++) {
            printf("%d ", a[i][j]);
        }
        putchar('\n');
    }
    putchar('\n');

    //output
    
    for (i = 0; i < r; i++) {
        for (j = 0; j < c; j++) {
            a[i][c] += a[i][j];
        }
    }

   
    for (j = 0; j < c; j++) {
        for (i = 0; i < r; i++) {
            a[r][j] += a[i][j], a[r][c] += a[i][j];
        }
    }

    for (i = 0; i <= r; i++) {
        for (j = 0; j <= c; j++) {
            printf("%d ", a[i][j]);
        }
        putchar('\n');
    }
    putchar('\n');
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:14:13: error: 'a' undeclared (first use in this function)
   14 |             a[i][j] = 0;
      |             ^
main.c:14:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio,h>
int main()
{
 int r,c,i,sum1,sum2,sum3;
 int h[101][101]={0};
 scanf("%d%d",&r,&c);

 for(i=1;i<=r;i++){
                   for(j=1;j<=c;j++){
                                     scanf("%d",&h[i][j]);
                                     }
                   }

 for(i=1;i<=r;i++){
                  sum1=0;
                  for(j=1;j<=c;j++){
                                    sum1+=h[i][j];
                                    h[i][j+1]=sum1;
                                    }
                   }

 for(j=1;j<=c;j++){
                  sum2=0;
                  for(i=1;i<=r;i++){
                                    sum2+=h[i][j];
                                    h[i+1][j]=sum2;
                                    }
                   }
 
 for(j=1;j<=c;j++){
                   i=r;
                   sum3=0;
                   sum3+=h[i+1][j];
                   h[i+1][j+1]=sum3;
                   }
 
 for(i=1;i<=r+1;i++){
                   for(j=1;j<=c+1;j++){
                                     printf("%d",h[i][j]);
                                     } 
  return 0;

}       



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

#include<stdio.h>
int main()
{
 int r,c,i,sum1,sum2,sum3;
 int h[101][101]={0};
 scanf("%d%d",&r,&c);

 for(i=1;i<=r;i++){
                   for(j=1;j<=c;j++){
                                     scanf("%d",&h[i][j]);
                                     }
                   }

 for(i=1;i<=r;i++){
                  sum1=0;
                  for(j=1;j<=c;j++){
                                    sum1+=h[i][j];
                                    h[i][j+1]=sum1;
                                    }
                   }

 for(j=1;j<=c;j++){
                  sum2=0;
                  for(i=1;i<=r;i++){
                                    sum2+=h[i][j];
                                    h[i+1][j]=sum2;
                                    }
                   }
 
 for(j=1;j<=c;j++){
                   i=r;
                   sum3=0;
                   sum3+=h[i+1][j];
                   h[i+1][j+1]=sum3;
                   }
 
 for(i=1;i<=r+1;i++){
                   for(j=1;j<=c+1;j++){
                                     printf("%d",h[i][j]);
                                     } 
  return 0;

}       



Compiler output:
main.c: In function 'main':
main.c:9:24: error: 'j' undeclared (first use in this function)
    9 |                    for(j=1;j<=c;j++){
      |                        ^
main.c:9:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:43:1: error: expected declaration or statement at end of input
   43 | }
      | ^
Language: C

#include<stdio.h>
int main()
{
 int r,c,i,sum1,sum2,sum3,j;
 int h[101][101]={0};
 scanf("%d%d",&r,&c);

 for(i=1;i<=r;i++){
                   for(j=1;j<=c;j++){
                                     scanf("%d",&h[i][j]);
                                     }
                   }

 for(i=1;i<=r;i++){
                  sum1=0;
                  for(j=1;j<=c;j++){
                                    sum1+=h[i][j];
                                    h[i][j+1]=sum1;
                                    }
                   }

 for(j=1;j<=c;j++){
                  sum2=0;
                  for(i=1;i<=r;i++){
                                    sum2+=h[i][j];
                                    h[i+1][j]=sum2;
                                    }
                   }
 
 for(j=1;j<=c;j++){
                   i=r;
                   sum3=0;
                   sum3+=h[i+1][j];
                   h[i+1][j+1]=sum3;
                   }
 
 for(i=1;i<=r+1;i++){
                   for(j=1;j<=c+1;j++){
                                     printf("%d",h[i][j]);
                                     } 
  return 0;

}       



Compiler output:
main.c: In function 'main':
main.c:43:1: error: expected declaration or statement at end of input
   43 | }
      | ^
Language: C

#include<stdio.h>
int main()
{
 int r,c,i,sum1,sum2,sum3,j;
 int h[101][101]={0};
 scanf("%d%d",&r,&c);

 for(i=1;i<=r;i++){
                   for(j=1;j<=c;j++){
                                     scanf("%d",&h[i][j]);
                                     }
                   }

 for(i=1;i<=r;i++){
                  sum1=0;
                  for(j=1;j<=c;j++){
                                    sum1+=h[i][j];
                                    h[i][j+1]=sum1;
                                    }
                   }

 for(j=1;j<=c;j++){
                  sum2=0;
                  for(i=1;i<=r;i++){
                                    sum2+=h[i][j];
                                    h[i+1][j]=sum2;
                                    }
                   }
 
 for(j=1;j<=c;j++){
                   i=r;
                   sum3=0;
                   sum3+=h[i+1][j];
                   h[i+1][j+1]=sum3;
                   }
 
 for(i=1;i<=r+1;i++){
                   for(j=1;j<=c+1;j++){
                                     printf("%d ",h[i][j]);
                                     printf("\n")
                                     } 
                      }
  return 0;

}       



Compiler output:
main.c: In function 'main':
main.c:40:50: error: expected ';' before '}' token
   40 |                                      printf("\n")
      |                                                  ^
      |                                                  ;
   41 |                                      }
      |                                      ~
Language: C

#include<stdio.h>
int main()
{
 int r,c,i,sum1,sum2,j,t;
 int h[101][101]={0};
 scanf("%d%d",&r,&c);

 for(i=1;i<=r;i++){
                   for(j=1;j<=c;j++){
                                     scanf("%d",&h[i][j]);
                                     }
                   }
 sum2=0
 for(i=1;i<=r;i++){
                  sum1=0;
                  for(j=1;j<=c;j++){
                                    sum1+=h[i][j];
                                    printf("%d ",h[i][j]);
                                    }
                   sum2+=sum1
                   printf("%d\n",sum1);
                   }

 for(j=1;j<=c;j++){
                  sum1=0;
                  for(i=1;i<=r;i++){
                                    sum1+=h[i][j];
                                    printf("%d ",h[i][j]);
                                    
                                    }
                   printf("%d\n",sum1);
                   }
  printf("%d\n",sum2);
  return 0;

}       



Compiler output:
main.c: In function 'main':
main.c:13:8: error: expected ';' before 'for'
   13 |  sum2=0
      |        ^
      |        ;
   14 |  for(i=1;i<=r;i++){
      |  ~~~
Language: C

#include<stdio.h>
int main()
{
 int r,c,i,sum1,sum2,j,t;
 int h[101][101]={0};
 scanf("%d%d",&r,&c);

 for(i=1;i<=r;i++){
                   for(j=1;j<=c;j++){
                                     scanf("%d",&h[i][j]);
                                     }
                   }
 sum2=0
 for(i=1;i<=r;i++){
                  sum1=0;
                  for(j=1;j<=c;j++){
                                    sum1+=h[i][j];
                                    printf("%d ",h[i][j]);
                                    }
                   sum2+=sum1;
                   printf("%d\n",sum1);
                   }

 for(j=1;j<=c;j++){
                  sum1=0;
                  for(i=1;i<=r;i++){
                                    sum1+=h[i][j];
                                    printf("%d ",h[i][j]);
                                    
                                    }
                   printf("%d\n",sum1);
                   }
  printf("%d\n",sum2);
  return 0;

}       



Compiler output:
main.c: In function 'main':
main.c:13:8: error: expected ';' before 'for'
   13 |  sum2=0
      |        ^
      |        ;
   14 |  for(i=1;i<=r;i++){
      |  ~~~
Language: C

#include <stdio.h>

int main(){
  int A[101][101],r,c,i,j,sum,total=0;

  scanf ("%d%d",&r,&c);

  for (i=0;i<r;i++)
    for (j=0;j<c;j++)
      scanf ("%d",&A[i][j]);

  for (j=0;j<c;j++){
    sum = 0;
      for (i=0;i<r;i++){
        sum += A[i][j];
        total += A[i][j];
    }
      A[i][j] = sum;
  }

 for (i=0;i<r;i++){
    sum = 0;
    for (j=0;j<c;j++){
      sum += A[i][j];
    }
    A[i][j] = sum;
  }

  A[r][c] = total;
  for (i=0;i<=r;i++){
    for (j=0;j<=;j++){
      printf ("%d ",A[i][j]);
    
    }
      printf ("%d\n",A[i][j]);
  }
  
  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:31:17: error: expected expression before ';' token
   31 |     for (j=0;j<=;j++){
      |                 ^
Language: C

#include <stdio.h>

int main(void){
  int r,c,i,j;
  static int s[101][101];

  scanf("%d%d",&r,&c);

  for(i=0;i<=r;i++){
    sum = 0;
    for(j=0;j<c;j++){
      scanf("%d", &s[i][j]);
      printf("%d ", s[i][j]);
      s[i][c] += s[i][j];
      s[r][j] += s[i][j];
    }
    printf("%d\n",s[i][c]);
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:5: error: 'sum' undeclared (first use in this function)
   10 |     sum = 0;
      |     ^~~
main.c:10:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(void){
	int x,i,j,r,c;
	int A[200][200]={0};
	
	scanf("%d %d",&r,&c);
	
	for(j=0;j<c;j++){
		for(i=0;i<r;i++){
			scanf("%d",&x);
			A[i][j]+=x;
		}
	}
	for(j=0;j<c;j++){
		for(i=0;i<r;i++){
			A[r][j]+=A[i][j];
		}
	}
	for(i=0;i<=r;i++){
		for(j=0;j<c;j++){
			A[i][c]+=A[i][j];
		}
	}
	for(j=0;j<=c;j++){
		for(i=0;i<=r;i++){
			printf("%d", A[i][j]);
			printf(" ");
		}
		printf("\n");
	}
	
	retu

Compiler output:
main.c: In function 'main':
main.c:33:9: error: 'retu' undeclared (first use in this function)
   33 |         retu
      |         ^~~~
main.c:33:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:33:13: error: expected ';' at end of input
   33 |         retu
      |             ^
      |             ;
main.c:33:9: error: expected declaration or statement at end of input
   33 |         retu
      |         ^~~~
Language: C

#include <stdio.h>

int main(){
	
	int r,c;
	
	scanf("%d %d",&r,&c);
	
	int a[r+1][c+1];
	
	int s,t;
	
	for(s=0;s<=r-1;s++){
		
		scanf("%*c");
		
		a[s][c]=0;
		
		for(t=0;t<=c-1;t++){
			
			scanf("%d ",&a[s][t]);
			
			a[s][c]+=a[s][t];
			
		}
		
	}
	
	for(b=0;b<=c-1;b++){
		
		a[r][c]+=a[r][b];
		
	}
	
	int x,y;
	
	for(y=0;y<=r;y++){
		
		for(x=0;x<=c;x++){
			
			printf("%d",a[x][y]);
			
			if(x!=c)
			
				printf(" ");
			
		}
		
		printf("\n")
		
	}
	
	return 0;
	
}

Compiler output:
main.c: In function 'main':
main.c:29:13: error: 'b' undeclared (first use in this function)
   29 |         for(b=0;b<=c-1;b++){
      |             ^
main.c:29:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:49:29: error: expected ';' before '}' token
   49 |                 printf("\n")
      |                             ^
      |                             ;
   50 | 
   51 |         }
      |         ~
Language: C

#include <stdio.h>

int main(void){
  int a[100][100];
  int i,j,r,c,sum_c,sum_r;

  scanf("%d%d",&r,&c);

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

  for(i=0;i<r;i++){
    sum_c=0;
    for(j=0;j<c;j++){
      sum_c+=a[i][j];
    }
    a[i][j]=sum_c;
  }

  for(j=0;j<=c;j++){
    sum_r=0;
    for(i=0;i<r;i++){
      sum_r+=a[i][j];
    }
    a[i][j]=sum_r;
  }

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

Compiler output:
main.c: In function 'main':
main.c:36:3: error: expected declaration or statement at end of input
   36 |   }
      |   ^
Language: C

#include<stdio.h>

int main(){
 int r,c,i,j;
 scanf("%d %d", &r, &c);
 int A[r+1][c+1];
 for(i=0; i<r; i++){
  for(j=0; j<c; j++){
   scanf("%d", A[r][c]);
  }
 }
 for(i=0;i<r;i++){
  for(j=0;j<c;j++){
   A[i][c] += A[i][j];
  }
 }
 for(i=0;i<c;i++){
  for(j=0;j<r;j++){
   A[r][i] += A[j][i];
  }
 }
 for(i=0;i<r+1;i++){
  for(j=0;j<c+1;j++){
   if(j==c){printf("%d ", A[i][j])}
   else{printf("%d\n", A[i][j])}
  }
 }
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:24:35: error: expected ';' before '}' token
   24 |    if(j==c){printf("%d ", A[i][j])}
      |                                   ^
      |                                   ;
main.c:25:32: error: expected ';' before '}' token
   25 |    else{printf("%d\n", A[i][j])}
      |                                ^
      |                                ;
Language: C

#include<stdio.h>

int main(){
 int r,c,i,j;
 int A[101][101]={};
 scanf("%d %d", &r, &c);
 for(i=0; i<r; i++){
  for(j=0; j<c; j++){
   scanf("%d", &A[i][j]);
  }
 }
 for(i=0;i<r;i++){
  for(j=0;j<c;j++){
   A[i][c] += A[i][j];
   A[r][j] += A[i][j];
   A[r][c] += A[i][j]
  }
 }
 for(i=0;i<r+1;i++){
  for(j=0;j<c+1;j++){
   if(j==c){printf("%d\n", A[i][j]);}
   else{printf("%d ", A[i][j]);}
  }
 }
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:22: error: expected ';' before '}' token
   16 |    A[r][c] += A[i][j]
      |                      ^
      |                      ;
   17 |   }
      |   ~