Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp2
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- int countKids = int.Parse(Console.ReadLine());
- int countLego = 0;
- int countMonopoly = 0;
- int countRobot = 0;
- int countPuzzle = 0;
- for (int kid = 1; kid <= countKids; kid++)
- {
- string present = Console.ReadLine();
- switch (present)
- {
- case "lego":
- countLego++;
- break;
- case "monopoly":
- countMonopoly++;
- break;
- case "robot":
- countRobot++;
- break;
- case "puzzle":
- countPuzzle++;
- break;
- }
- }
- Console.WriteLine("Lego:" + countLego);
- Console.WriteLine("Monopoly:" + countMonopoly);
- Console.WriteLine("Robots:" + countRobot);
- Console.WriteLine("Puzzles:" + countPuzzle);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement