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