This file contains hidden or 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
Random random = new Random(); | |
int rows = 30; | |
int min = 0; | |
int max = 101; | |
int[] nums = new int[rows]; | |
for (int i = 0; i < rows; i++) | |
{ | |
nums[i] = random.Next(min, max); |
This file contains hidden or 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
Random random = new Random(); | |
int rows = 10; | |
int columns = 10; | |
int min = 0; | |
int max = 16; | |
int[,] nums = new int[rows, columns]; | |
for (int i = 0; i < rows; i++) | |
{ |
This file contains hidden or 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[,] nums = { { 1, 2 }, { 3, 4 }, { 5, 6 } }; | |
int sum = 0; | |
int multiplication = 1; | |
int lineIndex = 1; | |
int columnIndex = 0; | |
Console.WriteLine("Изначальный массив:"); | |
for (int i = 0; i < nums.GetLength(0); i++) |
This file contains hidden or 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
const string CommandRandomNumber = "1"; | |
const string CommandNumberFromUser = "2"; | |
const string CommandClearConsole = "3"; | |
const string CommandExit = "4"; | |
bool isWork = true; | |
string userInput; | |
while (isWork) | |
{ |
This file contains hidden or 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
const string CommandRandomNumber = "1"; | |
const string CommandNumberFromUser = "2"; | |
const string CommandClearConsole = "3"; | |
const string CommandExit = "4"; | |
bool isWork = true; | |
string userInput; | |
while (isWork) | |
{ |
This file contains hidden or 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
Console.WriteLine("Для входа введите правильный пароль, после 3 неудачных попыток, войти не удастся("); | |
const string CommandCorrectPassword="Сегодня хорошая погода!"; | |
Console.WriteLine($"Правильный пароль: {CommandCorrectPassword} "); | |
string userPassword; | |
Console.WriteLine("Введите пароль: "); | |
userPassword = Console.ReadLine(); | |
if (CommandCorrectPassword!=userPassword) | |
{ | |
Console.WriteLine("Вы ввели неправильный пароль! Через 2 попытки устройство заблокируется. Попытайтесь еще."); |
This file contains hidden or 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
namespace ConsoleApp5 | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
const string CommandConvertRubToTenge = "1"; | |
const string CommandConvertRubToYuan = "2"; | |
const string CommandConvertTengeToRub = "3"; | |
const string CommandConvertTengeToYuan = "4"; |
This file contains hidden or 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
namespace ConsoleApp12 | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
const string CommandTextOutputOne = "1"; | |
const string CommandTextOutputTwo = "2"; | |
const string CommandRandomNumber = "3"; | |
const string CommandClearConsole = "4"; |
This file contains hidden or 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
namespace ConsoleApp1 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.WriteLine("Введите ваше имя: "); | |
string name = Console.ReadLine(); | |
Console.WriteLine("Введите любой символ: "); | |
char symbol = Console.ReadLine()[0]; |
This file contains hidden or 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
namespace ConsoleApp7 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Random randomNumber = new Random(); | |
int min = 1; | |
int max = 101; | |
int number = randomNumber.Next(min, max); |
NewerOlder