fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. var k:integer;
  13. begin
  14. readln(k);
  15. if(k<4){
  16. cout<<0;
  17. }else{
  18. k:=k-3;
  19. cout<<k;
  20. end.
  21. }
  22. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:3:1: error: ‘import’ does not name a type; did you mean ‘short’?
 import java.util.*;
 ^~~~~~
 short
prog.cpp:4:1: error: ‘import’ does not name a type; did you mean ‘short’?
 import java.lang.*;
 ^~~~~~
 short
prog.cpp:5:1: error: ‘import’ does not name a type; did you mean ‘short’?
 import java.io.*;
 ^~~~~~
 short
prog.cpp:10:8: error: expected ‘:’ before ‘static’
  public static void main (String[] args) throws java.lang.Exception
        ^~~~~~~
        :
prog.cpp:10:27: error: ‘String’ has not been declared
  public static void main (String[] args) throws java.lang.Exception
                           ^~~~~~
prog.cpp:10:36: error: expected ‘,’ or ‘...’ before ‘args’
  public static void main (String[] args) throws java.lang.Exception
                                    ^~~~
prog.cpp:10:40: error: expected ‘;’ at end of member declaration
  public static void main (String[] args) throws java.lang.Exception
                                        ^
                                         ;
prog.cpp:10:42: error: ‘throws’ does not name a type
  public static void main (String[] args) throws java.lang.Exception
                                          ^~~~~~
prog.cpp:22:1: error: expected ‘}’ at end of input
 }
 ^
prog.cpp:9:1: note: to match this ‘{’
 {
 ^
prog.cpp:22:1: error: expected unqualified-id at end of input
 }
 ^
stdout
Standard output is empty