Advertisement
desislava_topuzakova

01

Mar 31st, 2024
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. using System;
  2.  
  3. namespace 01
  4. {
  5. internal class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int count = int.Parse(Console.ReadLine());
  10.  
  11.  
  12. double totalPrice = 0;
  13.  
  14.  
  15. for (int i = 1; i <= count; i++)
  16. {
  17. string equipment = Console.ReadLine();
  18.  
  19. if (equipment == "bed")
  20. {
  21. totalPrice += 1300;
  22.  
  23. }
  24. else if (equipment == "jacuzzi")
  25. {
  26. totalPrice += 3200;
  27.  
  28. }
  29. else if (equipment == "towel")
  30. {
  31. totalPrice += 10;
  32.  
  33. }
  34. }
  35. Console.WriteLine($"{totalPrice:F2}");
  36. }
  37. }
  38. }
  39.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement