Advertisement
Spocoman

Change Bureau

Sep 2nd, 2024
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.61 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         double bitcoinCount = Double.parseDouble(scanner.nextLine()),
  7.                 yuanCount = Double.parseDouble(scanner.nextLine()),
  8.                 commision = Double.parseDouble(scanner.nextLine()),
  9.                 BTCToBGN = 1168, yuanToUSD = 0.15, USDToBGN = 1.76, BGNToEURO = 1.95,
  10.                 totalSum = (bitcoinCount * BTCToBGN + yuanCount * yuanToUSD * USDToBGN) / BGNToEURO * (100 - commision) / 100;
  11.  
  12.         System.out.printf("%.2f\n", totalSum);
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement