fr0stn1k

C#Light3.3.3_Kovylov

Feb 9th, 2018
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.34 KB | None | 0 0
  1. public static void Main(string[] args)
  2.         {
  3.             int[] numbers = { 12, 2, 5, 12, 5 };
  4.             int sum = 0;
  5.  
  6.             for (int i = 0; i < numbers.Length; i++)
  7.             {
  8.                 sum += numbers[i];
  9.             }
  10.  
  11.             Console.WriteLine("Сумма всех чисел в массиве: " + sum);
  12.         }
Advertisement
Add Comment
Please, Sign In to add comment