Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - cannot find symbol
symbol: constructor eTOx(double)
location: class javaapplication7.eTOx
at javaapplication7.Main.main(Main.java:16)
can anyone help out
public class eTOx{
public static void main(String[] args) {
System.out.println(eTOx(5));
}
public static float eTOx(float x){
float repeat= 1+x;
float n=2;
float answer=0;
float newAns=0;
for(int i=0;i<100;i++){
newAns=newAns+((float) Math.pow(x, n))/fact(n);
n++;
}
answer=repeat+newAns;
return answer;
}
public static float fact(float num) {
if (num <= 1) {
return 1;
}
else {
return num * fact(num-1);
}
}
}
Please use code tags in the future ->
-Locke

New Topic/Question
Reply
MultiQuote











|