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 paperPrice = Integer.parseInt(scanner.nextLine()) * 5.80,
- clothPrice = Integer.parseInt(scanner.nextLine()) * 7.20,
- gluePrice = Double.parseDouble(scanner.nextLine()) * 1.20,
- discount = Integer.parseInt(scanner.nextLine()),
- totalPrice = (paperPrice + clothPrice + gluePrice) * (1.0 - discount / 100);
- System.out.printf("%.3f\n", totalPrice);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement