onedollartotown
01-21-2009, 07:00 AM
Hi Guys,
I need help on how to use inputs for the Math.pow class which is represented by the variable n(the number of years).
public class ComputeInterest {
public static void main(String[ ] args) {
double L = Double.parseDouble(args[0]);
double i = Double.parseDouble(args[1]);
double n = Double.parseDouble(args[2]);
double C = L * (1 + i/100)n; // <<the power of n should be placed as follows.
System.out.println(C);
}}
Regards,
John
I need help on how to use inputs for the Math.pow class which is represented by the variable n(the number of years).
public class ComputeInterest {
public static void main(String[ ] args) {
double L = Double.parseDouble(args[0]);
double i = Double.parseDouble(args[1]);
double n = Double.parseDouble(args[2]);
double C = L * (1 + i/100)n; // <<the power of n should be placed as follows.
System.out.println(C);
}}
Regards,
John