Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
project euler 13, C#
//Title of this code //Rextester.Program.Main is the entry point for your code. Don't change it. using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { var n = Console.In.ReadToEnd(); string [] numbers = n.Split("\n".ToCharArray()); List<double> list = new List<double>(); for(int i=0; i<numbers.Length; i++) list.Add(Convert.ToDouble(numbers[i])); var sum = list.Sum(); Console.WriteLine(sum); } } }
run
|
edit
|
history
|
help
0
DateTime
Linq FirstOrDefault() null check in c#
asdxscddasdcf
Random IF OR
Binary search tree - In-order Traversal
T F
Pyramid
DN3
gass
Interface IEnumerable