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 180 views
180 views asked Oct 20, 2022 by avibootz
1 answer 154 views
1 answer 164 views
1 answer 146 views
2 answers 195 views
195 views asked Oct 20, 2022 by avibootz
1 answer 166 views
166 views asked Oct 19, 2022 by avibootz
1 answer 119 views
119 views asked Oct 19, 2022 by avibootz
...