Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- import java.lang.*;
- import java.io.*;
- class FixedInvestment {
- public static void main(String[] args){
- getTotalReturn();
- //System.out.println(getTotalReturn());
- }
- public static double getTotalReturn(){
- double investmentAmount = 200;
- double annualInterestRate = 0.05;
- int numberOfYears = 1;
- double totalReturn;
- totalReturn = investmentAmount * annualInterestRate * numberOfYears;
- System.out.println( "Deposit Amount : RM" + investmentAmount + " \n Annual Interest Rate :" + annualInterestRate + "%\n Number Of Years :" + numberOfYears + " YEARS" + "\n Total Return on the Investment After years above: " + totalReturn);
- return totalReturn;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement