Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class P08PetShop {
- 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 priceForDogs = countDogPacks * 2.50;
- double priceForCats = countCatPacks * 4;
- double finalSum = priceForCats + priceForDogs;
- System.out.println(finalSum + " lv.");
- }
- }
Advertisement
Comments
-
- Welcome to Twitber.com - The New Social Network!
-
- Welcome to https://Twitber.com - The New Social Network!
Add Comment
Please, Sign In to add comment
Advertisement