Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class ChangeBureau {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int bitcoin = Integer.parseInt(scanner.nextLine());
- double chineseYuan = Double.parseDouble(scanner.nextLine());
- double commisionPercent = Double.parseDouble(scanner.nextLine());
- double bitcoinPriceLeva = 1168;
- double yuanPriceDollar = 0.15; // dollar
- double dollar = 1.76; // leva
- double euro = 1.95;
- double yuanPriceToLev = (chineseYuan * yuanPriceDollar) * 1.76;
- double finalPriceLev = (bitcoinPriceLeva * bitcoin) + yuanPriceToLev;
- double finalPriceEuro = (bitcoinPriceLeva + yuanPriceToLev) / 1.95;
- double comissionValue = commisionPercent / 100;
- double finalAnswer = finalPriceEuro - (finalPriceEuro * comissionValue);
- System.out.printf("%.2f",finalAnswer);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement