Felanpro

uppgift88

Nov 19th, 2020
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package skola;
  7. import java.util.Scanner;
  8.  
  9. /**
  10. *
  11. * @author Felix 1
  12. */
  13. public class Uppgift88 {
  14.  
  15. /**
  16. * @param args the command line arguments
  17. */
  18. public static void main(String[] args) {
  19. double behållning = 1000;
  20.  
  21. for(int i = 1; i <= 20; i++)
  22. {
  23. behållning *= 1.05;
  24. behållning += 1000;
  25. }
  26. behållning += 1000;
  27.  
  28. System.out.println(behållning);
  29. }
  30.  
  31. }
  32.  
Add Comment
Please, Sign In to add comment