Task: | Karkit |
Sender: | user2874 |
Submission time: | 2021-10-12 08:58:07 +0300 |
Language: | Java |
Status: | COMPILE ERROR |
Compiler report
input/vastaus2.java:2: error: class Main is public, should be declared in a file named Main.java public class Main { ^ 1 error
Code
import java.util.Scanner; public class Main { public static void main (String [] args){ Scanner lukija = new Scanner(System.in); int eka = Integer.valueOf(lukija.nextLine()); int toka = Integer.valueOf(lukija.nextLine()); int kolmas = Integer.valueOf(lukija.nextLine()); System.out.println(eka-(toka+kolmas)); } }