fork download
  1. public class Konwersja
  2. {
  3. public static void main(String[] args)
  4. {
  5. int system1=0;
  6. try
  7. {
  8. system1=Integer.parseInt(br.readLine());
  9. }
  10. {
  11. System.out.println("E - komunikat o błędzie");
  12. return;
  13. }
  14. int system2=0;
  15. try
  16. {
  17. system2=Integer.parseInt(br.readLine());
  18. }
  19. {
  20. System.out.println("E - komunikat o błędzie");
  21. return;
  22. }
  23. String[] cyfry=br.readLine().split(" ");
  24. int liczba=0;
  25. for (int i=0;i<cyfry.length;i++)
  26. try
  27. {
  28. liczba=liczba*system1+Integer.parseInt(cyfry[i]);
  29. }
  30. {
  31. System.out.println("E - komunikat o błędzie");
  32. return;
  33. }
  34. ArrayList<int> cyfry2=new ArrayList<int>();
  35. do
  36. {
  37. cyfry2.add(liczba%system2);
  38. liczba/=system2;
  39. }
  40. while (liczba>0)
  41. for (int i=cyfry2.size();i-->0;)
  42. System.out.print(cyfry2.get(i)+" ");
  43. System.out.println();
  44. }
  45. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:44: ';' expected
		while (liczba>0)
		                ^
1 error
stdout
Standard output is empty