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