daily pastebin goal
34%
SHARE
TWEET

HW1

a guest Mar 19th, 2018 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.company;
  2.  
  3. public class Main {
  4.  
  5.     public static void main(String[] args) {
  6.         int austrianPopulation  = 8443018;
  7.         int belgianPopulation   = 11094850;
  8.         int bulgarianPopulation = 7364570;
  9.         int swedishPopulation   = 9482855;
  10.         int polishPopulation    = 38538447;
  11.         System.out.println("\n Task 1: \n");
  12.         System.out.println("Австрия: " + austrianPopulation + " человек");
  13.         System.out.println("Бельгия: " + belgianPopulation + " человек");
  14.         System.out.println("Болгария: " + bulgarianPopulation + " человек");
  15.         System.out.println("Швеция: " + swedishPopulation + " человек");
  16.         System.out.println("Польша: " + polishPopulation + " человек");
  17.  
  18.         System.out.println("\n Task 2: \n");
  19.         double austrianTerritory  = 83858;
  20.         double belgianTerritory   = 30510;
  21.         double bulgarianTerritory = 110994;
  22.         double swedishTerritory   = 449964;
  23.         double polishTerritory    = 312685;
  24.         System.out.println("Австрия: "  + austrianTerritory  + " km²(" + austrianTerritory *1000000 + " m²) или " + austrianTerritory * 0.38610 + "mi²");
  25.         System.out.println("Бельгия: "  + belgianTerritory   + " km²(" + belgianTerritory  *1000000 + " m²) или " + belgianTerritory  * 0.38610 + "mi²");
  26.         System.out.println("Болгария: " + bulgarianTerritory + " km²(" + bulgarianTerritory*1000000 + " m²) или " + bulgarianTerritory* 0.38610 + "mi²");
  27.         System.out.println("Швеция: "   + swedishTerritory   + " km²(" + swedishTerritory  *1000000 + " m²) или " + swedishTerritory  * 0.38610 + "mi²");
  28.         System.out.println("Польша: "   + polishTerritory    + " km²(" + polishTerritory   *1000000 + " m²) или " + polishTerritory   * 0.38610 + "mi²");
  29.  
  30.         System.out.println("\n Task 3: \n");
  31.         float sum = 5000.0f;
  32.         float dollar = 26.350f;
  33.         float euro   = 32.300f;
  34.         float pound  = 35.720f;
  35.         float zloty  =  7.400f;
  36.         System.out.println("UAN - " + sum);
  37.         System.out.println("USD - " + sum/dollar);
  38.         System.out.println("EUR - " + sum/euro);
  39.         System.out.println("GBP - " + sum/pound);
  40.         System.out.println("PLN - " + sum/zloty);
  41.     }
  42. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top