✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
class Class1
{ рublic static int Сума()
{ int [] a = {1, 2, 3, 4, 5}, b = {1, 2, 3};
int s = 0;
for (int i = 0; i
{Try {s = a [i] + b [i]; }
catch (IndexOutOfRangeException)
{Console.Write ( "Виняток-1."); throw ; }
}
return s;
}}
class Test
{ рublic static void Main ()
{ int s = 21;
try {s = Class1.Сумма(); }
catch (IndexOutOfRangeException)
{Console.Write ( "Програму завершено."); }
Console.WriteLine ( "s =" + s);
}}
Вкажіть результат виведення на консоль після спроби запустити програму на компіляцію і виконання:
C# oop_class