import java.io.*; class tretiodmo { static double x1, x2, a, eps=0.000000000000001; public static void main (String [] arg){ a=26; x2 = a; do { x1 = x2; x2 = x1 + (a / (Math.pow (x1,2)) - x1) / 3; }while (Math.abs(x2 - x1) > eps) ; System.out.println("treti = " + x2 + " treti mocnina " + Math.pow(x2,3)); } }