Input/Output for pairs of numbers: Difference between revisions
Content added Content deleted
SqrtNegInf (talk | contribs) (Added Perl example) |
(Added C# implementation) |
||
Line 201: | Line 201: | ||
5 5 |
5 5 |
||
3 |
|||
30 |
|||
2 |
|||
102 |
|||
10 |
|||
</pre> |
|||
=={{header|C sharp}}== |
|||
<lang csharp>using System; |
|||
using static System.Linq.Enumerable; |
|||
public class Program |
|||
{ |
|||
static void Main(string[] args) |
|||
{ |
|||
int count = Convert.ToInt32(Console.ReadLine()); |
|||
for (int line = 0; line < count; line++) { |
|||
Console.WriteLine(Console.ReadLine().Split(' ').Sum(i => Convert.ToInt32(i))); |
|||
} |
|||
} |
|||
}</lang> |
|||
{{out}} |
|||
<pre> |
|||
3 |
3 |
||
30 |
30 |