Advertisement
Ivakis

Парички

Aug 8th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class uprajnenie {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6.  
  7. int bitcoins = Integer.parseInt(scanner.nextLine());
  8. double yuan = Double.parseDouble(scanner.nextLine());
  9. double commissionPercentage = Double.parseDouble(scanner.nextLine());
  10.  
  11. double bitcoinsToLv = bitcoins * 1168;
  12. double yuanToLv = yuan * 0.15 * 1.76;
  13.  
  14. double totalLv = bitcoinsToLv + yuanToLv;
  15.  
  16. double euro = totalLv / 1.95;
  17.  
  18. double commission = (euro / 100) * commissionPercentage;
  19.  
  20. double moneyLeft = euro - commission;
  21.  
  22. System.out.printf("%.2f", moneyLeft);
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement