generated from admin/template
puuuush
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
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("=============================");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user