Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. package mengamatihasilperubahannilaidarisuatusistem;
  2.  
  3. /**
  4. * Created by ASUS on 3/30/2017.
  5. */
  6. public class Mengamatihasilperubahannilaidarisuatusistem {
  7. public static void main(String[] args) {
  8.  
  9. float total = 14000;
  10. System.out.println("Original investment: $" + total);
  11.  
  12. // Increases by 40 percent the first year
  13. total = total + (total * .4F);
  14. System.out.println("After one year: $" + total);
  15.  
  16. // Loses $1,500 the second year
  17. total = total - 1500F;
  18. System.out.println("After two years: $" + total);
  19.  
  20. // Increases by 12 percent the third year
  21. total = total + (total * .12F);
  22. System.out.println("After three years: $" + total);
  23.  
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement