Advertisement
Spocoman

08. Pet Shop

Aug 21st, 2024
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.50 KB | None | 0 0
  1. using System;
  2.  
  3. namespace PetShop
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double dogFoodPrice = 2.50;
  10.             double catFoodPrice = 4.00;
  11.            
  12.             int dogFoodCount = int.Parse(Console.ReadLine());
  13.             int catFoodCount = int.Parse(Console.ReadLine());
  14.  
  15.             double totalPrice = dogFoodPrice * dogFoodCount + catFoodPrice * catFoodCount;
  16.  
  17.             Console.WriteLine($"{totalPrice} lv.");
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement