How to add two stdin input numbers using Linq in C#

1 Answer

0 votes
using System;
using System.Linq;

class Program
{
    static void Main()
    {
        // Stdin Inputs : 17 9
        
        Console.WriteLine(Console.ReadLine().Split().Select(int.Parse).Sum());
    }
}




/*
run:

26

*/

 



answered Oct 18, 2022 by avibootz

Related questions

1 answer 186 views
186 views asked Oct 20, 2022 by avibootz
1 answer 159 views
1 answer 176 views
1 answer 155 views
2 answers 208 views
208 views asked Oct 20, 2022 by avibootz
1 answer 172 views
172 views asked Oct 19, 2022 by avibootz
1 answer 126 views
126 views asked Oct 19, 2022 by avibootz
...