Last active
October 18, 2022 12:32
-
-
Save Velsimir/115e12c843864a7137ea77554de36c3a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Security.Policy; | |
namespace iJunior | |
{ | |
class MainClass | |
{ | |
public static void Main(string[] args) | |
{ | |
char userSymbol; | |
string userName; | |
int charactersUpToRectangle = 2; | |
int cycleInteration = 2; | |
Console.Write("Привет! Как тебя зовут? - "); | |
userName = Console.ReadLine(); | |
Console.Write("Введи любой символ: "); | |
userSymbol = Convert.ToChar(Console.ReadLine()); | |
Console.Clear(); | |
for (int i = 0; i < cycleInteration; i++) | |
{ | |
for (int j = 0; j < userName.Length + charactersUpToRectangle; j++) | |
{ | |
Console.Write(userSymbol); | |
} | |
Console.WriteLine(); | |
if (i == 0) | |
{ | |
Console.WriteLine(userSymbol + userName + userSymbol); | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment