Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- namespace simonEpedal
- {
- class Program
- {
- public static void Main(string[] args)
- {
- int[] array = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
- for (int sumElement = 0; sumElement < array.Length - 1; sumElement++)
- {
- for (int currentElement = 0; currentElement < array.Length - 1; currentElement++)
- {
- array[currentElement] = array[currentElement] + array[currentElement + 1];
- }
- }
- Console.WriteLine(array[0]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment