Untitled

 avatar
unknown
plain_text
2 years ago
833 B
2
Indexable
class Program
    {
        static string[] Metoda3(string s)
        {
            s = "wiersz wyjsciowy";
            int x = s.Length + 1;
            string[] t1 = new string[x];
            int licznik = x;
            while (licznik >= x)
            {
                int j = x; 
                while (licznik > j)
                {
                    t1[j] = s.Substring(j, licznik); 
                    j--; 
                }
                licznik--;
            }
            return t1;
        }
        static void Main(string[] args)
        { //na odwrot chce drukowac trojkat
            string s = "wiersz wyjsciowy";
            string[] wynik = Metoda3(s);
            foreach (string x in wynik)
                Console.WriteLine(x);
            Console.ReadKey();
        }
    }
Editor is loading...