Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class PetShop {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int countDogPacks = Integer.parseInt(scanner.nextLine());
- int countCatPacks = Integer.parseInt(scanner.nextLine());
- double priceDogFood = countDogPacks * 2.50;
- double priceCatFood = countCatPacks * 4;
- double totalPrice = priceCatFood + priceDogFood;
- System.out.println(totalPrice + " lv.");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement