1234567891011121314151617181920212223242526272829303132 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace prakt_1_klassi
- {
- internal class zadanie2
- {
- public static string text;
- public static void udalenie(int ind)
- {
- try
- {
- char[] chars = text.ToCharArray();
- text = Convert.ToString(chars[0]);
- for (int i = 1; i < ind + 1; i++)
- {
- text = text + chars[i];
- }
- Console.WriteLine(text);
- }
- catch (Exception ex)
- {
- Console.WriteLine(ex.Message);
- Console.WriteLine(ex.StackTrace);
- }
- }
- }
- }
|