desislava_topuzakova

01.Money 17.07.2016

Mar 9th, 2018
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. package Mentorship;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class test {
  6. public static void main(String[] agrs) {
  7. Scanner scanner = new Scanner(System.in);
  8.  
  9. double bitcoins = Double.parseDouble(scanner.nextLine())*1168;
  10. double yuan = Double.parseDouble(scanner.nextLine())*0.15*1.76;
  11. double commission = Double.parseDouble(scanner.nextLine())/100;
  12.  
  13. double bitcoinsToEur = bitcoins / 1.95;
  14. double yuanToEur = yuan / 1.95;
  15.  
  16. System.out.printf("%.2f",((bitcoinsToEur + yuanToEur)-((bitcoinsToEur + yuanToEur)*commission)));
  17. }
  18. }
Add Comment
Please, Sign In to add comment