I have been trying to find a way to make my code which does exponents accept an input for E and X. I know that if I use the scanner util, it would make this possible. But so far, I haven't found a way to do that. If you could help that would be sweet, thanks!
import java.util.Scanner;
public class SimpleExponents {
public static void main(String[] args) {
int e = 6;
int x = 4;
double result;
result = Math.pow(e,x);
System.out.println( result );
}
}