Advertisement
desislava_topuzakova

05. Character Sequence

Jun 25th, 2022
1,078
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.71 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _05._Stream_of_letters
  4. {
  5.     internal class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string text = Console.ReadLine(); //"softuni"
  10.             //всички позиции в текста (0 до последната)
  11.  
  12.             //повтаряме: взимаме символа на позиция + печатаме
  13.             //начало: 0
  14.             //край: дължина - 1
  15.             //промяна: +1
  16.  
  17.             for (int position = 0; position <= text.Length - 1; position++)
  18.             {
  19.                 char symbol = text[position];
  20.                 Console.WriteLine(symbol);
  21.             }
  22.  
  23.  
  24.         }
  25.     }
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement