Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Main.java public class Exercise 0 2 _ 2 1 { public static void main ( String [ ] args ) & java.util.Scanner input = new

Main.java
public class Exercise02_21{
public static void main(String[] args) &
java.util.Scanner input = new java.util.Scanner(
System.in):
// Enter the investment amount
System.out.print(
"Enter the investment amount, for example 120000.95: "):
double investmentAmount = input. nextDouble():
// Enter yearly interest rate
System.out.print("Enter annual interest rate, for example 8.25: ");
double annualinterestRate = input nextDouble () :
// Obtain monthly interest rate
double monthlyInterestRate = annualinterestRate ?1200 :
// Enter number of years
System.out.print(
"Enter number of years as an integer, for example 5: "):
int numbefears = input. nextInt ():
double futurevalue =
investmentAmount * Math.pow(1+ monthlyInterestRate,
num0fYears *12):
System.out.print("Future value is "+
(int)(futureValue *100)/100.0):
}
}
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 19th International Conference Dexa 2008 Turin Italy September 2008 Proceedings Lncs 5181

Authors: Sourav S. Bhowmick ,Josef Kung ,Roland Wagner

2008th Edition

3540856536, 978-3540856535

More Books

Students also viewed these Databases questions

Question

Explain the Neolithic age compared to the paleolithic age ?

Answered: 1 week ago

Question

What is loss of bone density and strength as ?

Answered: 1 week ago

Question

6. Identify characteristics of whiteness.

Answered: 1 week ago

Question

9. Explain the relationship between identity and communication.

Answered: 1 week ago