Guest User

Untitled

a guest
Nov 14th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. public class Main {
  2.  
  3.  
  4. public static void main(String[] args) {
  5. int liczba = 1000;
  6. for (int i = 999; i >= 100; i--) {
  7. for (int j = 999; j >= 100; j--) {
  8. //System.out.println(+ i * j );
  9. int wynik = i * j;
  10. StringBuilder xy = new StringBuilder("" + wynik);
  11. String yx = "" + wynik;
  12. xy.reverse();
  13. if (yx.equals(xy.toString()) && liczba < wynik) {
  14. liczba = wynik;
  15. System.out.println(liczba);
  16. }
  17. }
  18.  
  19.  
  20. }
  21.  
  22. }
  23.  
  24.  
  25.  
  26.  
  27. }
Add Comment
Please, Sign In to add comment