vstoyanov

23 задача

Mar 30th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.77 KB | None | 0 0
  1.  
  2.  
  3. import com.sun.xml.internal.bind.v2.runtime.reflect.opt.Const;
  4.  
  5. public class Main {
  6.  
  7.     public static void main(String[] args) {
  8.  
  9.  
  10.  
  11.           int bornChildPer120Sec = 120;
  12.  
  13.           double bornChildPerSec = 1.00/bornChildPer120Sec;
  14.  
  15.         int deathPer100Sec = 100;
  16.  
  17.         double deathPerSec = 1.00/deathPer100Sec;
  18.  
  19.  
  20.         int emigrantPer40Sec = 40;
  21.  
  22.         double emigratPerSec = 1.00/emigrantPer40Sec;
  23.  
  24.  
  25.         double sumPerSec=(bornChildPerSec+emigratPerSec)-deathPerSec;
  26.  
  27.         double sum=sumPerSec*60*60*24*365;
  28.  
  29.         int populationNow=81198000;
  30.  
  31.         Double after10YearPopulation=populationNow+sum;
  32.  
  33.         String result=String.format("%.0f",after10YearPopulation);
  34.  
  35.  
  36.         System.out.println(result);
  37.  
  38.  
  39.  
  40.  
  41.     }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment