fork(1) 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. int i = 4;
  13. double d = 4.0;
  14. String s = "HackerRank ";
  15. Scanner scan = new Scanner(System.in);
  16. int a = scan.nextInt();
  17. double b = scan.nextDouble();
  18. scan.nextLine();
  19. String c = scan.nextLine();
  20. System.out.println(i + a);
  21. System.out.println(d + b);
  22. String res = s.concat(c);
  23. System.out.println(res);
  24. scan.close();
  25. }
  26. }
Success #stdin #stdout 0.08s 2184192KB
stdin
12
4.0
is a learning site
stdout
16
8.0
HackerRank is a learning site