generated from admin/template
31 lines
1.0 KiB
C#
31 lines
1.0 KiB
C#
namespace DefaultNamespace;
|
|
|
|
public class ex3
|
|
{
|
|
static void RegisterTourment(in double x, in double difficulty, params string[] participants)
|
|
{
|
|
Console.WriteLine($"Коэффициент стадиона: {difficulty}");
|
|
Console.WriteLine("Список участников:");
|
|
|
|
foreach (string pokemon in participants)
|
|
{
|
|
Console.WriteLine($" * {pokemon}");
|
|
}
|
|
}
|
|
|
|
static void Main(string[] args)
|
|
{
|
|
Console.WriteLine("=== РЕГИСТРАЦИЯ НА ТУРНИР ===");
|
|
double stadiumDifficulty = 1.5;
|
|
|
|
// Первый вызов: 2 покемона через params
|
|
RegisterTournament(in stadiumDifficulty, "Булбазавр", "Чармандер");
|
|
Console.WriteLine("-----------------------------");
|
|
|
|
// Второй вызов: 4 покемона через params
|
|
RegisterTournament(in stadiumDifficulty, "Сквиртл", "Пикачу", "Псайдак", "Мяут");
|
|
Console.WriteLine("=============================");
|
|
}
|
|
|
|
|
|
} |