Language: Java

import java.util.Scanner;
  2 class C7{
  3     public static void main(String[] args){
  4         Scanner in = new Scanner(System.in);
  5             int r = in.nextInt();
  6             int c = in.nextInt();
  7             for(int i=0; i<r; i++){
  8                 int g = 0;
  9                 for(int j = 0; j<c+1; j++){
 10                     if(c-1 == j){                                                                
 11                         System.out.print(g);
 12                     }else{
 13                     int h = in.nextInt();
 14                     System.out.print(h + " ");
 15                     g += h;
 16                     }
 17                 }
 18             }
 19     }
 20 }

Compiler output:
Main.java:2: error: class, interface, enum, or record expected
  2 class C7{
  ^
Main.java:3: error: illegal start of type
  3     public static void main(String[] args){
  ^
Main.java:4: error: not a statement
  4         Scanner in = new Scanner(System.in);
  ^
Main.java:4: error: ';' expected
  4         Scanner in = new Scanner(System.in);
   ^
Main.java:5: error: not a statement
  5             int r = in.nextInt();
  ^
Main.java:5: error: ';' expected
  5             int r = in.nextInt();
   ^
Main.java:6: error: not a statement
  6             int c = in.nextInt();
  ^
Main.java:6: error: ';' expected
  6             int c = in.nextInt();
   ^
Main.java:7: error: not a statement
  7             for(int i=0; i<r; i++){
  ^
Main.java:7: error: ';' expected
  7             for(int i=0; i<r; i++){
   ^
Main.java:8: error: not a statement
  8                 int g = 0;
  ^
Main.java:8: error: ';' expected
  8                 int g = 0;
   ^
Main.java:9: error: not a statement
  9                 for(int j = 0; j<c+1; j++){
  ^
Main.java:9: error: ';' expected
  9                 for(int j = 0; j<c+1; j++){
   ^
Main.java:10: error: not a statement
 10                     if(c-1 == j){                                                                
 ^
Main.java:10: error: ';' expected
 10                     if(c-1 == j){                                                                
   ^
Main.java:11: error: not a statement
 11                         System.out.print(g);
 ^
Main.java:11: error: ';' expected
 11                         System.out.print(g);
   ^
Main.java:12: error: not a statement
 12                     }else{
 ^
Main.java:12: error: ';' expected
 12                     }else{
   ^
Main.java:13: error: not a statement
 13                     int h = in.nextInt();
 ^
Main.java:13: error: ';' expected
 13                     int h = in.nextInt();
   ^
Main.java:14: error: not a statement
 14                     System.out.print(h + " ");
 ^
Main.java:14: error: ';' expected
 14                     System.out.print(h + " ");
   ^
Main.java:15: error: not a statement
 15                     g += h;
 ^
Main.java:15: error: ';' expected
 15                     g += h;
   ^
Main.java:16: error: not a statement
 16                     }
 ^
Main.java:16: error: ';' expected
 16                     }
   ^
Main.java:17: error: not a statement
 17                 }
 ^
Main.java:17: error: ';' expected
 17                 }
   ^
Main.java:18: error: not a statement
 18             }
 ^
Main.java:18: error: ';' expected
 18             }
   ^
Main.java:19: error: not a statement
 19     }
 ^
Main.java:19: error: ';' expected
 19     }
   ^
Main.java:20: error: illegal start of type
 20 }
 ^
35 errors