borkins

Exam 17-Jul-2016 - 01. Money

May 16th, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.65 KB | None | 0 0
  1. /**
  2.  * Project: Exam_17_July_2016 - created by borkins on 2017-05-16.
  3.  */
  4.  
  5. import java.util.Scanner;
  6.  
  7. public class _01_Money
  8. {
  9.     public static void main(String[] args)
  10.     {
  11.         Scanner console = new Scanner(System.in);
  12.        
  13.         int bitcoins = Integer.parseInt(console.nextLine());
  14.         double yuans = Double.parseDouble(console.nextLine());
  15.         double commission = Double.parseDouble(console.nextLine());
  16.        
  17.         double leva = (bitcoins * 1168) + ((yuans * 0.15) * 1.76);
  18.         double euros = (leva / 1.95);
  19.         euros -= (euros * commission / 100);
  20.        
  21.         System.out.printf("%.2f%n", euros);
  22.     }
  23. }
Add Comment
Please, Sign In to add comment