Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.59 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class p18_Money {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.  
  7.         int bitcoins = Integer.parseInt(scanner.nextLine());
  8.         double chu = Double.parseDouble(scanner.nextLine());
  9.         double commission = Double.parseDouble(scanner.nextLine());
  10.  
  11.         double n1 = bitcoins * 1168;
  12.         double n2 = (chu * 1.76) * 0.15;
  13.         double n3 = (n1 + n2) / 1.95;
  14.         double n4 = n3 * (commission / 100);
  15.  
  16.         double result = n3 - n4;
  17.  
  18.         System.out.printf("%.2f", result);
  19.  
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement