Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. using System;
  2.  
  3. namespace DogStore
  4. {
  5. class DogStore
  6. {
  7. static void Main(string[] args)
  8. {
  9. var numberOfDogs = int.Parse(Console.ReadLine());
  10. var numberOfOtherAnimals = int.Parse(Console.ReadLine());
  11.  
  12. var dogFoodPrice = 2.5d;
  13. var otherAnimalFoodPrice = 4;
  14.  
  15. var moneyPaidForDogs = dogFoodPrice * numberOfDogs;
  16. var moneyPaidForOtherAnimals = otherAnimalFoodPrice * numberOfOtherAnimals;
  17.  
  18. var result = Math.Round((moneyPaidForDogs + moneyPaidForOtherAnimals), 2).ToString("0.00");
  19.  
  20. Console.WriteLine($"{result} lv.");
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement