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);
- int days = Integer.parseInt(scanner.nextLine()),
- cookers = Integer.parseInt(scanner.nextLine()),
- cakes = Integer.parseInt(scanner.nextLine()),
- waffles = Integer.parseInt(scanner.nextLine()),
- pancakes = Integer.parseInt(scanner.nextLine());
- double sum = days * cookers * ((cakes * 45.00) + (waffles * 5.80) + (pancakes * 3.20));
- System.out.printf("%.2f\n", sum - sum / 8);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement