Advertisement
dragonbs

PetShop

Sep 15th, 2022
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.64 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _08.PetShop
  4. {
  5.     internal class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int numberOfDogFood = int.Parse(Console.ReadLine());
  10.             int numberOfCatFood = int.Parse(Console.ReadLine());
  11.             double singlePriceForDogFood = 2.50;
  12.             double singlePriceForCatFood = 4;
  13.  
  14.             double priceForDogFood = numberOfDogFood * singlePriceForDogFood;
  15.             double priceforCatFood = numberOfCatFood * singlePriceForCatFood;
  16.  
  17.             double sum = priceForDogFood + priceforCatFood;
  18.  
  19.             Console.WriteLine($"{sum} lv.");
  20.         }
  21.     }
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement