Calculating Compound Interest using Method

 import java.util.Scanner;


public class CI {

public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.print("Input the investment amount: ");
double investment = in.nextDouble();
System.out.print("Input the rate of interest: ");
double rate = in.nextDouble();
System.out.print("Input number of years: ");
int year = in.nextInt();

rate *= 0.01;

System.out.println("Years FutureValue");
for (int i = 1; i <= year; i++) {
int formatter = 19;
if (i >= 10)
formatter = 18;
System.out.printf(i + "%" + formatter + ".2f\n", futureInvestVal(investment, rate / 12, i));
}
}

public static double futureInvestVal(double Amount, double monthRate, int years) {
return Amount * Math.pow(1 + monthRate, years * 12);
}
}

Google Script for Data Entry Form in Google Spreadsheet

// function to validate the entry made by user in user form function validateEntry (){ // declare a variable and referernece of active goog...