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 Salary
- {
- class Program
- {
- static void Main(string[] args)
- {
- int numTabsN = int.Parse(Console.ReadLine());
- double salary = double.Parse(Console.ReadLine());
- for (int i = 0; i < numTabsN; i++)
- {
- string nameTabs = Console.ReadLine();
- if (nameTabs=="Facebook")
- {
- salary -= 150;
- }
- else if (nameTabs=="Instagram")
- {
- salary -= 100;
- }
- else if (nameTabs=="Reddit")
- {
- salary -= 50;
- }
- else
- {
- salary = salary;
- }
- }
- if (salary == 0)
- {
- Console.WriteLine($"You have lost your salary.");
- }
- else
- {
- Console.WriteLine(salary);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement