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 countDog = Integer.parseInt(scanner.nextLine());
- int countCat = Integer.parseInt(scanner.nextLine());
- double onePackDog = 2.50;
- double onePackCat = 4;
- double totalDog = countDog * onePackDog;
- double totalCat = countCat * onePackCat;
- double totalSum = totalCat + totalDog;
- // System.out.printf("%f lv.", totalSum);
- System.out.println(totalSum + " lv.");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement