Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Gym
- {
- class Program
- {
- static void Main(string[] args)
- {
- byte n = byte.Parse(Console.ReadLine());
- decimal sum = 0;
- string name;
- for (; n > 0; n--)
- {
- name = Console.ReadLine();
- if (name == "treadmill")
- {
- sum += 5899;
- }
- if (name == "exercise bike")
- {
- sum += 1789;
- }
- if (name == "dumbells")
- {
- sum += 579;
- }
- if (name == "cross trainer")
- {
- sum += 1699;
- }
- }
- Console.WriteLine(sum);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement