Advertisement
Guest User

yesbe

a guest
Mar 24th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace FitnessEquipment
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int n = int.Parse(Console.ReadLine());
  14. int c = 0;
  15. for (int i = 0; i < n; i++)
  16. {
  17. var FitnessEquipment = Console.ReadLine();
  18. {
  19. if (FitnessEquipment == "treadmill")
  20. {
  21. c += 5899;
  22. }
  23. else if (FitnessEquipment == "cross trainer")
  24. {
  25. c += 1699;
  26. }
  27. else if (FitnessEquipment == "exercise bike")
  28. {
  29. c += 1789;
  30. }
  31. else if (FitnessEquipment == "dumbbells")
  32. {
  33. c += 579;
  34. }
  35.  
  36.  
  37.  
  38.  
  39. }
  40.  
  41.  
  42.  
  43.  
  44. }
  45. Console.WriteLine("{0:f2}", c);
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52. }
  53. }
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement