Guest User

Untitled

a guest
Feb 22nd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Task_3._3._3
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int sum = 0;
  14. int[] numbers = { 12, 2, 5, 12, 5 };
  15.  
  16. for(int i = 0; i < numbers.Length; i++)
  17. {
  18. sum += numbers[i];
  19.  
  20. }
  21. Console.WriteLine($"Sum of array numbers = {sum}");
  22.  
  23. Console.ReadLine();
  24. }
  25. }
  26. }
Add Comment
Please, Sign In to add comment