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 _11ExtendedHowManytimesElementIsinArray
- {
- class Program
- {
- static void Main(string[] args)
- {
- int[] num =Console.ReadLine().Split().Select(int.Parse).ToArray();
- int match = int.Parse(Console.ReadLine());
- int count = 0;
- foreach (int a in num)
- {
- if (a == match)
- {
- count++;
- }
- else
- {
- continue;
- }
- }
- Console.WriteLine(count);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment