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
Console.Write("Ваше имя: "); | |
string name = Console.ReadLine(); | |
Console.Write("Ваше любимое блюдо: "); | |
string dish = Console.ReadLine(); | |
Console.Write("Ваш любимый напиток: "); | |
string drink = Console.ReadLine(); | |
Console.Write($"Добрый день, {name}! Ваш заказ готов: {dish} и {drink}"); |
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 pictures = 52; | |
int rowSize = 3; | |
int rowsWithPictures = pictures / rowSize; | |
int extraPictures = pictures % rowSize; | |
Console.WriteLine($"Всего будет {rowsWithPictures} рядов с картинками и {extraPictures} останется не у дел"); |
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 = "Nikita"; | |
string surname = "Shamshurin"; | |
string changer; | |
changer = name; | |
name = surname; | |
surname = changer; |
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 cristalPrice = 10; | |
int cristals = 0; | |
int money; | |
Console.Write("Укажите колчиество имеющихся у Вас монет:"); | |
money = Convert.ToInt32(Console.ReadLine()); | |
Console.WriteLine($" монет в наличии : {money}, кристалов в наличии {cristals} "); ; | |
Console.Write($"Укажите сколько кристаллов по {cristalPrice} монет Вы хотите купить:") ; | |
cristals = Convert.ToInt32(Console.ReadLine()); | |
money -= cristals * cristalPrice; |
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 admissionDuration = 10; | |
int minutesInHour = 60; | |
int patients,hours,minutes; | |
Console.Write("Укажите колчиество пациентов:"); | |
patients = Convert.ToInt32(Console.ReadLine()); | |
minutes = patients * admissionDuration; | |
hours = minutes / minutesInHour; | |
minutes = minutes % minutesInHour; |
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 admissionDuration = 10; | |
int minutesInHour = 60; | |
int patients; | |
int hoursOfWaiting; | |
int minutesOfWaiting; | |
Console.Write("Укажите колчиество пациентов:"); | |
patients = Convert.ToInt32(Console.ReadLine()); | |
minutesOfWaiting = patients * admissionDuration; | |
hoursOfWaiting = minutesOfWaiting / minutesInHour; |
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 admissionDuration = 10; | |
int minutesInHour = 60; | |
int patients; | |
int allWaitingTimeInMinutes; | |
int hoursOfWaiting; | |
int minutesOfWaiting; | |
Console.Write("Укажите колчиество пациентов:"); | |
patients = Convert.ToInt32(Console.ReadLine()); | |
allWaitingTimeInMinutes = patients * admissionDuration; |
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 text; | |
int numberOfRepeats; | |
Console.Write("Напишите предложение: "); | |
text = Console.ReadLine(); | |
Console.Write("Укажите количество повторений: "); | |
numberOfRepeats = Convert.ToInt32(Console.ReadLine()); | |
while (numberOfRepeats > 0) { | |
Console.WriteLine(text); |
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 exitWord = "exit"; | |
string currentWord = ""; | |
while (currentWord != exitWord) { | |
Console.Write("Напишите слово: "); | |
currentWord = Console.ReadLine(); | |
} | |
Console.Write("Цикл закончен"); |
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 text; | |
int numberOfRepeats; | |
Console.Write("Напишите предложение: "); | |
text = Console.ReadLine(); | |
Console.Write("Укажите количество повторений: "); | |
numberOfRepeats = Convert.ToInt32(Console.ReadLine()); | |
for (int i = 0; i < numberOfRepeats; i++) | |
{ |
OlderNewer