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 _04___Trainers_Salary
- {
- class Program
- {
- static void Main(string[] args)
- {
- double lections = double.Parse(Console.ReadLine());
- double budget = double.Parse(Console.ReadLine());
- string roli = null;
- string trofon = null;
- string sino = null;
- string jelev = null;
- string royal = null;
- string others = null;
- double counter = 0.0;
- double counterJelev = 0.0;
- double counterRoli = 0.0;
- double counterTrofon = 0.0;
- double counterSino = 0.0;
- double counterRoYal = 0.0;
- for (int i = 1; i <= lections ; i++)
- {
- string lector = Console.ReadLine();
- if (lector == "Roli")
- {
- counterRoli++;
- }
- else if (lector == "Trofon")
- {
- counterTrofon++;
- }
- else if (lector == "Sino")
- {
- counterSino++;
- }
- else if (lector == "Jelev")
- {
- counterJelev++;
- }
- else if (lector == "RoYaL")
- {
- counterRoYal++;
- }
- else
- {
- counter++;
- }
- }
- roli += (budget / lections) * counterRoli;
- trofon += (budget / lections) * counterTrofon;
- sino += (budget / lections) * counterSino;
- jelev += (budget / lections) * counterJelev;
- royal += (budget / lections) * counterRoYal;
- others += (budget / lections) * counter;
- Console.WriteLine($"Jelev salary: {jelev:f2} lv");
- Console.WriteLine($"RoYaL salary: {royal:f2} lv");
- Console.WriteLine($"Roli salary: {roli:f2} lv");
- Console.WriteLine($"Trofon salary: {trofon:f2} lv");
- Console.WriteLine($"Sino salary: {sino:f2} lv");
- Console.WriteLine($"Others salary: {others:f2} lv");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement