Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class SuppliesForSchool {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int pensCount = Integer.parseInt(scanner.nextLine());
- int markersCount = Integer.parseInt(scanner.nextLine());
- int detergentLiters = Integer.parseInt(scanner.nextLine());
- int discountPercent = Integer.parseInt(scanner.nextLine());
- double pensSum = pensCount * 5.80;
- double markersSum = markersCount * 7.20;
- double detergentSum = detergentLiters * 1.20;
- double totalSum = pensSum + markersSum + detergentSum;
- double finalSum = totalSum - (totalSum * (discountPercent/100.0));
- System.out.println(finalSum);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement