Advertisement
desislava_topuzakova

01.ChangeBureau

Mar 31st, 2020
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.70 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class ChangeBureau_01 {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.  
  7.         int bitcoins = Integer.parseInt(scanner.nextLine());
  8.         double chinese = Double.parseDouble(scanner.nextLine());
  9.         double comission = Double.parseDouble(scanner.nextLine());
  10.  
  11.         double bitcoinsInLeva = bitcoins * 1168;
  12.         double chineseInLeva = chinese * 0.15 * 1.76;
  13.         double sumInLeva = bitcoinsInLeva + chineseInLeva;
  14.         double comissionInLeva = (comission * sumInLeva) / 100;
  15.         double resultInEuro = (sumInLeva - comissionInLeva) / 1.95;
  16.         System.out.printf("%.2f", resultInEuro);
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement