Advertisement
Guest User

Untitled

a guest
Dec 27th, 2011
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement