Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string[] niz = new string[30];
- int x;
- Console.WriteLine("Unesite reΔ:");
- string s = Console.ReadLine();
- for (int i = 0; i < s.Length; i++)
- {
- x = 0;
- for (int j = 0; j < s.Length; j++)
- {
- if (s[i] == s[j])
- {
- x++;
- niz[i] = s[i] + " - " + x.ToString() + "\n";
- }
- }
- }
- for (int i = 0; i < niz.Length; i++)
- Console.WriteLine(niz[i]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement