
write a program to evaluate the following investment equation make use of wrapper class v=p(1+r)rest to n

import java.util.*;
class Investment
{
public static void main(String[] args)
{
Scanner input=new Scanner(System.in);
System.out.print("Enter the value of p: ");
double p=input.nextDouble();
System.out.print("Enter the value of r: ");
double r=input.nextDouble();
System.out.print("Enter the value of n: ");
double n=input.nextDouble();
double v1=1+r;
double v2=Math.pow(v1,n);
double v=p*v2;
Double d=new Double(v);
System.out.println(d);
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.