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