finding a given root if a number java
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();//the number of which i want to find the root
System.out.println("enter the root:");
int rootNum = sc.nextInt();//the N-th number root
double powerOf = 1;
double sqrt = 0;
double b = 1;
while (a > b) {
sqrt = powerOf + 0.0000001;//flexible
powerOf = sqrt;
for(int i = 1; i < rootNum; i++) {
b = sqrt*powerOf;
sqrt = b;
}
}