Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static int getCharIndex(string text, char mark)
- {
- int znak = 0;
- for (int i = 0; i < text.Length; i++)
- {
- if (text[i] == mark)
- {
- znak = i;
- break;
- }
- else
- {
- znak = -1;
- }
- }
- Console.WriteLine("Wybrany znak jest w indeksie numer ");
- return znak;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement