Advertisement
desislava_topuzakova

01.

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