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) {
- double dogFoodPrice = 2.50;
- int catFoodPrice = 4;
- Scanner scanner = new Scanner(System.in);
- int dogFoodCount = Integer.parseInt(scanner.nextLine());
- int catFoodCount = Integer.parseInt(scanner.nextLine());
- double result = dogFoodPrice * dogFoodCount + catFoodPrice * catFoodCount;
- System.out.println(result + " lv.");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement