Advertisement
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 _1
- {
- class Program
- {
- static void IleA(char[] tab)
- {
- for (int i = 0; i < tab.Length; i++)
- {
- if (tab[i]=='a')
- {
- Console.WriteLine(" Na pozycji {0} jest a",i+1);
- }
- }
- }
- static void Main(string[] args)
- {
- char[] literki = new char[10];
- var dupa = "zadek";
- char[] literki2 = dupa.ToArray();
- IleA(literki2);
- Console.WriteLine("Wpisz litery ");
- for (int i = 0; i <literki.Length; i++)
- {
- var read = Console.ReadKey();
- literki[i] = read.KeyChar;
- }
- IleA(literki);
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement