Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package skola;
- /**
- *
- * @author Felix 1
- */
- public class Övning86 {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- double folkmängd = 1000000;
- int år = 0;
- while(folkmängd < 2000000)
- {
- folkmängd = folkmängd * 1.05;
- år++;
- }
- System.out.println("Det tar " + år + " år");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement