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
string name; | |
char symbolForBox; | |
int stringLength; | |
string stringToOutput=""; | |
Console.Write("Введите ваше имя: "); | |
name = Console.ReadLine(); | |
Console.Write("Введите символ: "); | |
symbolForBox = Convert.ToChar(Console.ReadLine()); |
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
string password = "1245"; | |
string inputPassword; | |
bool passwordFound = false; | |
int tryCount = 3; | |
Console.WriteLine("Вы пытаетесь получить доступ к данным Зоны 51: "); | |
for (int i=0; i<tryCount; i++) | |
{ | |
Console.Write("Введите пароль: "); | |
inputPassword = Console.ReadLine(); |
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
float heroHealth = 500; | |
int skillsCount = 3; | |
int chosenSkill; | |
int burnedTurnsCount = 0; | |
int burningCounts = 2; | |
int burningDamage = 5; | |
int fireballDamage = 80; | |
int bloodStrikeDamage = 90; | |
float damageDone = 0; | |
float selfDamageDone = 0; |
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
int[,] array = new int[4, 5]; | |
int sum = 0; | |
int multiplication = 1; | |
Random random = new Random(); | |
int minRandomValue = 2; | |
int maxRandomValue = 8; | |
for (int i = 0; i < array.GetLength(0); i++) | |
{ | |
for (int j = 0; j < array.GetLength(1); j++) |
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
int[,] array = new int[10, 10]; | |
Random random = new Random(); | |
int maxElement = int.MinValue; | |
int currentValue = int.MinValue; | |
int maxValuePositionI = 0; | |
int maxValuePositionJ = 0; | |
int minRandomValue = 1; | |
int maxRandomValue = 10; | |
Console.WriteLine("Исходная матрица: "); |
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
int[] array = new int[30]; | |
string localMax = ""; | |
Random random = new Random(); | |
int minRandomValue = 0; | |
int maxRandomValue = 10; | |
for (int i = 0; i < array.Length; i++) | |
{ | |
array[i] = random.Next(minRandomValue, maxRandomValue); | |
Console.Write(array[i] + " "); |
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
int[] array = new int[0]; | |
int sum = 0; | |
string inputValue; | |
bool isOpen = true; | |
Console.WriteLine("Программа осуществляет суммирование данных"); | |
Console.WriteLine("Для ввода доступны целые числа, а также команды sum " + | |
"- для вывода суммы всех введенных значений и exit - для завершения работы"); | |
while (isOpen) |
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
static void Main(string[] args) | |
{ | |
int positionX = 0; | |
int PositionY = 0; | |
int currentValue = 40; | |
int maxValue = 100; | |
char symbol = '#'; | |
char emptySymbol = '_'; | |
DrawBar(positionX, PositionY, currentValue, maxValue, emptySymbol, symbol, ConsoleColor.Red); |
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
static void Main(string[] args) | |
{ | |
int[] array = new int[10]; | |
Random random = new Random(); | |
for (int i = 0; i < array.Length; i++) | |
array[i] = random.Next(0, 10); | |
WriteArray(array); | |
Shuffle(array); |
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
static void Main(string[] args) | |
{ | |
Console.WriteLine("Успех. Введено число " + ReadInt()); | |
} | |
static int ReadInt() | |
{ | |
int foundInt = 0; | |
bool intFound = false; | |
string input; |