Advertisement
BloodMoonYTC

Alkarakterlanc

Oct 24th, 2021
603
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.67 KB | None | 0 0
  1. using System;
  2.  
  3. namespace alkarakterlanc
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string sz1, AlSz;
  10.             int poz, hossz;
  11.  
  12.             Console.Write("Írd be a stringet: ");
  13.             sz1 = Console.ReadLine();
  14.  
  15.             Console.Write("Honnan: ");
  16.             poz = int.Parse(Console.ReadLine());
  17.  
  18.             Console.Write("Hosszusagban: ");
  19.             hossz = int.Parse(Console.ReadLine());
  20.  
  21.             AlSz = sz1.Substring(poz, hossz);
  22.             Console.WriteLine("Az alsztring : " + AlSz);
  23.  
  24.             Console.WriteLine("Kólity Kristóf");
  25.             Console.ReadLine();
  26.         }
  27.     }
  28. }
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement