Advertisement
Guest User

Untitled

a guest
May 19th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.42 KB | None | 0 0
  1. import java.io.*;
  2. import java.util.*;
  3.  
  4. public class Main
  5. {
  6.    public static void main(String[] args)
  7.    {
  8.       Scanner in = new Scanner(System.in);
  9.  
  10.       double firstDay = in.nextInt();
  11.       double goal = in.nextInt();
  12.      
  13.       double done = firstDay;
  14.       int days = 1;
  15.       while (done <= goal) {
  16.           done += (done / 10) * 7;
  17.           days++;
  18.       }
  19.  
  20.       System.out.print(days - 1);
  21.    }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement