Dido09

Money

Jan 1st, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Money {
  4.  
  5. public static void main(String[] args) {
  6.  
  7. Scanner scan = new Scanner(System.in);
  8. int bitcoin = Integer.parseInt(scan.nextLine());
  9. double yuans = Double.parseDouble(scan.nextLine());
  10. double commission = Double.parseDouble(scan.nextLine()) / 100;
  11. double bitcoinToLeva = bitcoin * 1168;
  12. double yuansToDollar = yuans * 0.15;
  13. double dollarToLeva = yuansToDollar * 1.76;
  14. double leva = bitcoinToLeva + dollarToLeva;
  15. double euro = leva / 1.95;
  16. euro -= commission * euro;
  17. System.out.println(euro);
  18.  
  19. }
  20.  
  21. }
Add Comment
Please, Sign In to add comment