using System;
class Program
{
static void Main()
{
// Calling the method with different numbers of arguments
PrintNumbers(1, 2, 3, 4, 5);
PrintNumbers(6, 7, 8);
}
// Method that accepts any number of integer arguments
static void PrintNumbers(params int[] arr)
{
foreach (int number in arr) {
Console.Write(number + " ");
}
Console.WriteLine();
}
}
/*
run:
1 2 3 4 5
6 7 8
*/