galinyotsev123

ProgBasicsExam12January2019-E01ChangeBureau

Jan 26th, 2019
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6.  
  7. int bitcoins = Integer.parseInt(scanner.nextLine());
  8. double chineseYuan = Double.parseDouble(scanner.nextLine());
  9. double commission = Double.parseDouble(scanner.nextLine());
  10.  
  11. double dollars = 0.15 * chineseYuan;
  12. double leva = dollars * 1.76;
  13. double euro = leva / 1.95;
  14.  
  15. double total = ((bitcoins * 1168) + leva) / 1.95;
  16. double totalAfterCommission = total * (commission / 100);
  17.  
  18. System.out.printf("%.2f",total - totalAfterCommission);
  19. }
  20. }
Add Comment
Please, Sign In to add comment