Advertisement
Tellexxii

1.3.6.2

Jul 25th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.64 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Collections.Specialized;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Net;
  7. using System.Threading;
  8.  
  9. namespace IMJunior
  10. {
  11.     class Program
  12.     {
  13.  
  14.         static void Main(string[] args)
  15.         {
  16.             int myInt = SomeMul(10,5,7,19);
  17.             Console.WriteLine(myInt);
  18.         }
  19.         public static int SomeMul(params int[] numbers)
  20.         {
  21.             int result = 1;
  22.             for (int i = 0; i < numbers.Length; i++)
  23.             {
  24.                 result *= numbers[i];
  25.             }
  26.             return result;
  27.         }
  28.     }
  29.    
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement