fork(1) download
  1. import java.math.BigInteger;
  2. import java.util.Scanner;
  3.  
  4.  
  5.  
  6. public class Hello {
  7. public static BigInteger reverse(BigInteger num){
  8. return new BigInteger(new StringBuilder(num+"").reverse().toString());
  9. }
  10. public static void main(String[] args) {
  11. System.out.println("Дай мне число, больше ста!");
  12. Scanner in = new Scanner(System.in);
  13. BigInteger bi = in.nextBigInteger();
  14. byte cont = 0;
  15. do {
  16. BigInteger rev = reverse (bi);
  17. BigInteger sum = bi.add(rev);
  18. int x = sum.toString().length();
  19. if (x % 2 == 0){
  20. int half = x / 2;
  21. double result = Math.pow(10,half);
  22. int i = (int) double;
  23. //bi = sum % half;
  24. bi = sum.divide(i);
  25. System.out.println(result);
  26. } else {
  27.  
  28. }
  29. cont ++;
  30. } while (cont <1);
  31.  
  32.  
  33. }
  34. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:22: error: '.class' expected
                int i = (int) double;
                                    ^
1 error
stdout
Standard output is empty