Skip to content

Instantly share code, notes, and snippets.

View Strelok78's full-sized avatar

Shota Strelok78

  • Saint-Petersburg, Russia
View GitHub Profile
@Strelok78
Strelok78 / iJunior_C#_Lesson_28
Last active April 21, 2025 12:27
Console password check
using System.Diagnostics;
namespace iJuniorPractice;
class Program
{
static void Main(string[] args)
{
const string Password = "abc";
@Strelok78
Strelok78 / iJunior_C#_Lesson_27
Last active April 21, 2025 11:38
get symbol and name and return name in square of symbols
using System.Diagnostics;
namespace iJuniorPractice;
class Program
{
static void Main(string[] args)
{
string name;
char symbol;
@Strelok78
Strelok78 / iJunior_C#_Lesson_26
Last active April 18, 2025 11:18
Currency convertor
using System.Diagnostics;
namespace iJuniorPractice;
class Program
{
static void Main(string[] args)
{
const int CommandexchangeRateRubToUsd = 1;
const int CommandexchangeRateRubToEuro = 2;
@Strelok78
Strelok78 / iJunior_C#_Lesson_25
Last active April 12, 2025 13:19
Create a program with commands controlled via Console
namespace iJuniorPractice;
class Program
{
static void Main(string[] args)
{
const int CommandSetCharacterName = 1;
const int CommandSetHp = 2;
const int CommandSetDamage = 3;
const int CommandResetCharacter = 4;
@Strelok78
Strelok78 / iJunior_C#_Lesson_24
Last active April 10, 2025 08:28
Output sum of numbers up to random number and multiple of 3 or 5
namespace iJuniorPractice;
class Program
{
static void Main(string[] args)
{
Random random = new Random();
int maxRandomValue = 100;
int randomValue = random.Next(maxRandomValue + 1);
int multipleFirst = 3;
@Strelok78
Strelok78 / iJunior_C#_Lesson_23
Last active April 8, 2025 12:15
Вывод последовательности с помощью цикла с заданными начальным, максимальными значениями и шагом
namespace iJuniorPractice;
class Program
{
static void Main(string[] args)
{
int startValue = 5;
int stepValue = 7;
int maxValue = 103;
@Strelok78
Strelok78 / iJunior_C#_Lesson_22
Last active April 8, 2025 12:12
Do program while "exit" is not entered in console line by user
namespace iJuniorPractice;
class Program
{
static void Main(string[] args)
{
string commandExit = "exit";
string userMessage = string.Empty;
while (userMessage != commandExit)
@Strelok78
Strelok78 / iJunior_C#_Lesson_21
Last active April 2, 2025 14:18
Вывод сообщения пользователя кол-во раз заданное пользователем
namespace iJuniorPractice;
class Program
{
static void Main(string[] args)
{
string userMessage;
string messageRequestText = "Введите сообщение: ";
string messageRepeatCountRequestText = "Введите кол-во повторений сообщения: ";
int messageRepeatCount;
@Strelok78
Strelok78 / iJunior_C#_Lesson_20
Last active April 2, 2025 12:30
Расчет времени ожидания в очереди поликлиники (10 мин - 1 человек)
namespace iJuniorPractice;
class Program
{
static void Main(string[] args)
{
int patientCountInQueue;
int minPerPatient = 10;
int waitingTimeTotal;
int minutesInHour = 60;
@Strelok78
Strelok78 / iJunior_C#_Lesson_19
Created April 1, 2025 11:27
Магазин кристаллов (без проверки достаточности средств)
namespace iJuniorPractice;
class Program
{
static void Main(string[] args)
{
int price = 10;
int wallet;
int buyingCount;