Guest User

Untitled

a guest
Nov 24th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. using System.Text.RegularExpressions;
  2. int ow = 0;
  3. int ace = 0;
  4. int ore = 0;
  5. string bunch = Console.ReadLine();
  6. foreach (Match a in Regex.Matches(bunch, "ow"))
  7. {
  8. ow++;
  9. }
  10.  
  11. foreach (Match b in Regex.Matches(bunch, "ace"))
  12. {
  13. ace++;
  14. }
  15.  
  16. foreach (Match c in Regex.Matches(bunch, "ore"))
  17. {
  18. ore++;
  19. }
Add Comment
Please, Sign In to add comment