java question
Find the smallest number x, such that x > 1, and Square Roots , Cube root and Fifth Roots are all integers??
i tried this code in java, but no result ?
    int i = 1;
    while (true) {
        i++;
        if (Math.pow(i, 1.0 / 2) % 1 == 0 &&
                Math.pow(i, 1.0 / 3) % 1 == 0 &&
                Math.pow(i, 1.0 / 5) % 1 == 0) {
            break;
        }
        System.out.println(i);
    }
				
                        
Your if condition is not correct !
Your code should be :