Advertisement
MladenKarachanov

Petshop

Jan 9th, 2023
984
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.47 KB | None | 0 0
  1. package ProgrammingBasics2;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class PetShop {
  6.     public static void main(String[] args) {
  7.         Scanner scanner= new Scanner(System.in);
  8.         int foodDog = Integer.parseInt(scanner.nextLine());
  9.         int foodCat = Integer.parseInt(scanner.nextLine());
  10.         double oneFoodDog=foodDog*2.50;
  11.         double oneFoodCat=foodCat*4;
  12.         double sum=oneFoodCat+oneFoodDog;
  13.         System.out.printf("%.1f lv",sum);
  14.     }
  15. }
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement