Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double processorPrice = Double.parseDouble(scanner.nextLine()),
- videoPrice = Double.parseDouble(scanner.nextLine()),
- ramPrice = Double.parseDouble(scanner.nextLine());
- int ramCount = Integer.parseInt(scanner.nextLine());
- double discount = Double.parseDouble(scanner.nextLine()), USDToBGN = 1.57,
- sum = ((processorPrice + videoPrice) * (1 - discount) + ramPrice * ramCount) * USDToBGN;
- System.out.printf("Money needed - %.2f leva.\n", sum);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement