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 bedPrice = Double.parseDouble(scanner.nextLine()),
- toiletPrice = Double.parseDouble(scanner.nextLine()),
- foodPrice = toiletPrice * 1.25,
- toyPrice = foodPrice / 2,
- vetPrice = toyPrice * 1.1,
- sum = (toiletPrice + foodPrice + toyPrice + vetPrice) * 12 * 1.05 + bedPrice;
- System.out.printf("%.2f\n", sum);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement