Advertisement
Samorokimetal

ChangeBureau

Apr 14th, 2020 (edited)
46
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 ChangeBureau {
  4.  
  5.     public static void main(String[] args) {
  6.        
  7.         Scanner scan = new Scanner(System.in);
  8.        
  9.         int bitcoinAmount = Integer.parseInt(scan.nextLine());
  10.         int cnyAmount = Integer.parseInt(scan.nextLine());
  11.         double komisionna = Double.parseDouble(scan.nextLine());
  12.        
  13.         double eur = 1.95;
  14.         double usd = 1.76;
  15.         double cny = 0.15 * usd;
  16.         double bitcoin = 1168;
  17.         double totalBgn = bitcoin * bitcoinAmount + cny * cnyAmount;
  18.         double totalEur = (totalBgn / eur) * ((100 - komisionna)/100);     
  19.        
  20.         System.out.printf("%.2f", totalEur);
  21.     }
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement