Question: I need help making a psuedocode for the program:import java.util.Scanner; public class Exercise 0 2 _ 2 1 { public static void main ( String

I need help making a psuedocode for the program:import java.util.Scanner;
public class Exercise02_21{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// ask the user to enter the investment amount
System.out.print("Enter investment amount: ");
double investmentAmount = sc.nextDouble();
// ask the user to enter the annual interest rate
System.out.print("Enter annual interest rate in percentage: ");
double annualInterestRate = sc.nextDouble();
// ask the user to enter number of years
System.out.print("Enter number of years: ");
int numberOfYears = sc.nextInt();
// calculate the monthlyInterestRate
double monthlyInterestRate = annualInterestRate /100/12;
// calculate the futureInvestmentValue
double futureInvestmentValue = investmentAmount * Math.pow(1+ monthlyInterestRate, numberOfYears *12);
// display the future amount
System.out.printf("Future value is $%.2f%n", futureInvestmentValue);
}
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!