Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp5
- {
- class Program
- {
- static void Main()
- {
- var str = "asxd xsa";
- var result = "";
- for (int i = 0; i < str.Length; i++)
- {
- bool end = true;
- for (int j = i + 1; j < str.Length; j++)
- {
- if (str[i] == str[j])
- {
- result += str[i];
- end = false;
- break;
- }
- }
- if (end == true)
- break;
- }
- Console.WriteLine(result);
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement