Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class demo {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int bitcoin = Integer.parseInt(scanner.nextLine());
- double cny = Double.parseDouble(scanner.nextLine());
- double commissionRate = Double.parseDouble(scanner.nextLine());
- int bitcoinToLv = bitcoin * 1168;
- double cnyToUsd = cny * 0.15;
- double cnyToLv = cnyToUsd * 1.76;
- double euro = (bitcoinToLv + cnyToLv) / 1.95;
- double commission = euro * (commissionRate / 100);
- double result = euro - commission;
- System.out.printf("%.2f", result);
- }
- }
Add Comment
Please, Sign In to add comment