Guest User

Money

a guest
Sep 6th, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. package book1;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class money {
  6. public static void main(String[] args){
  7. Scanner scanner = new Scanner(System.in);
  8.  
  9. int bitcoins = Integer.parseInt(scanner.nextLine());
  10. double yoans = Double.parseDouble(scanner.nextLine());
  11. double comission = Double.parseDouble(scanner.nextLine());
  12.  
  13. double yoansToUSD = yoans * 0.15;
  14. double USDtoBGN = yoansToUSD * 1.76;
  15. double totalLeva = (bitcoins * 1168) + USDtoBGN;
  16. double euros = totalLeva / 1.95;
  17. double commissionSum = euros * (comission / 100);
  18. double totalEuros = euros - commissionSum;
  19.  
  20. System.out.println(totalEuros);
  21.  
  22. }
  23. }
Add Comment
Please, Sign In to add comment