NedyalkoKikov

SplitArray

May 28th, 2016
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 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 ConsoleApplication1
  8. {
  9. class Test
  10. {
  11. static void Main()
  12. {
  13. char[] separators = { ' ' };
  14. string[] item = Console.ReadLine().Split(separators, StringSplitOptions.RemoveEmptyEntries);
  15. int[] sum = item.Select(int.Parse).ToArray();
  16. Console.WriteLine(sum.Sum());
  17. }
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment