Adilol

woo

Sep 10th, 2011
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.49 KB | None | 0 0
  1. /*
  2.  * To change this template, choose Tools | Templates
  3.  * and open the template in the editor.
  4.  */
  5.  
  6. package lolwat;
  7.  
  8. /**
  9.  *
  10.  * @author adil
  11.  */
  12. public class Main {
  13.  public static void main(String[] args){
  14.         double amount;
  15.         double principle = 10000;
  16.         double rate = .01;
  17.  
  18.         for(int day=1;day<=20;day++){
  19.  
  20.  
  21.         amount=principle*Math.pow(1 + rate, day);
  22.         System.out.println(day + "   "+ amount);
  23.          }
  24.  
  25.  
  26.  
  27.     }
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment