Advertisement
MayloGreen

DZ_frameAndName

May 6th, 2021 (edited)
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.89 KB | None | 0 0
  1. using System;
  2.  
  3. namespace DZ_frameAndName
  4. {
  5.     class Program
  6.     {
  7.         public static void Main(string[] args)
  8.         {
  9.             string word;
  10.             string symbol;
  11.  
  12.             Console.WriteLine("Введите слово или предложение:");
  13.             word = Console.ReadLine();
  14.  
  15.             Console.WriteLine("\nВведите символ из которого будет состоять рамка:");
  16.             symbol = Console.ReadLine();
  17.  
  18.             for (int topFrame = 0; topFrame < word.Length + 2; topFrame++)
  19.             {
  20.                 Console.Write(symbol);
  21.             }
  22.  
  23.             Console.WriteLine();
  24.             Console.WriteLine(symbol + word + symbol);
  25.  
  26.             for (int bottomFrame = 0; bottomFrame < word.Length + 2; bottomFrame++)
  27.             {
  28.                 Console.Write(symbol);
  29.             }
  30.         }
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement