Advertisement
Stan08

MoreRegex/2.Email me

Jun 22nd, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. using System;
  2. using System.Text.RegularExpressions;
  3. using System.Linq;
  4. using System.Globalization;
  5. using System.Collections.Generic;
  6. using System.Text;
  7.  
  8. class MainClass
  9.  
  10. {
  11.  
  12. public static void Main(string[] args)
  13.  
  14. {
  15. string input = Console.ReadLine();
  16.  
  17. Match before = Regex.Match(input, @".*@");
  18. Match after = Regex.Match(input, @"@.*");
  19.  
  20. int b = 0;
  21. int a = 0;
  22. foreach(var s in before.ToString())
  23. {
  24. b += Convert.ToInt32(s);
  25. }
  26. foreach(var s in after.ToString())
  27. {
  28. a += Convert.ToInt32(s);
  29. }
  30.  
  31. if ((b - a) >= 0)
  32. {
  33.  
  34. Console.WriteLine("Call her!");
  35.  
  36. }
  37. else
  38. {
  39. Console.WriteLine("She is not the one.");
  40. }
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement