Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _05._Salary
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- int wrongTabs = int.Parse(Console.ReadLine());
- int salary = int.Parse(Console.ReadLine());
- for (int tab = 1; tab <= wrongTabs; tab++)
- {
- string website = Console.ReadLine();
- switch (website)
- {
- case "Facebook":
- salary -= 150;
- break;
- case "Instagram":
- salary -= 100;
- break;
- case "Reddit":
- salary -= 50;
- break;
- }
- if (salary <= 0)
- {
- Console.WriteLine("You have lost your salary.");
- break;
- }
- }
- if (salary > 0)
- {
- Console.WriteLine(salary);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement