0_0_34155841_20278.cpp:1:1: error: 'import' does not name a type
import java.util.Scanner;
^
0_0_34155841_20278.cpp:3:10: error: expected ':' before 'static'
public static void Main(String[]args){
^
0_0_34155841_20278.cpp:3:27: error: 'String' has not been declared
public static void Main(String[]args){
^
0_0_34155841_20278.cpp:3:35: error: expected ',' or '...' before 'args'
public static void Main(String[]args){
^
0_0_34155841_20278.cpp:3:39: error: return type specification for constructor invalid
public static void Main(String[]args){
^
0_0_34155841_20278.cpp:3:39: error: constructor cannot be static member function
0_0_34155841_20278.cpp:19:1: error: expected ';' after class definition
}
^
0_0_34155841_20278.cpp: In constructor 'Main::Main(int*)':
0_0_34155841_20278.cpp:4:5: error: 'Scanner' was not declared in this scope
Scanner kb=new Scanner(System.in);
^
0_0_34155841_20278.cpp:6:4: error: 'kb' was not declared in this scope
i=kb.nextInt();
^
0_0_34155841_20278.cpp:14:4: error: 'System' was not declared in this scope
System.out.print(sum+"\n");
^
|