View difference between Paste ID: 04HRQitt and DUHKPJ1i
SHOW: | | - or go back to the newest paste.
1
// C#.NET
2
#using System.Console;
3
#using System.Collections.Generic;
4
5
static void main(string[] args)
6
{
7
	int i;
8
	string a = null;
9
	List<string> l = new List<string()>;
10
	foreach (string s1 in args)
11
	{
12
		a += s1;
13
		a += " ";
14
	}
15
	foreach (string s in a.Split('|'))
16
	{
17
		foreach (string s2 in s.Split(' '))
18
		{
19
			try
20
			{
21
				i+= Int32.Parse(s2);
22
			}catch (Exception e){}
23
		}
24
		WriteLine(i);
25
		i = 0;
26
	}
27
}