Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- namespace Array_Search
- {
- class Program
- {
- static void Main(string[] args)
- {
- int[] numbers = Console.ReadLine().Split(',').Select(int.Parse).ToArray();
- string result = string.Empty;
- for (int i = 1; i <= numbers.Length; i++)
- {
- bool isThere = false;
- for (int j = 0; j < numbers.Length; j++)
- {
- if(i==numbers[j])
- {
- isThere = true;
- break; ;
- }
- }
- if (isThere==false)
- {
- result += i+",";
- }
- }
- result=result.Trim(result[result.Length - 1]);
- Console.WriteLine(result);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement