Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Text.RegularExpressions;
- int ow = 0;
- int ace = 0;
- int ore = 0;
- string bunch = Console.ReadLine();
- foreach (Match a in Regex.Matches(bunch, "ow"))
- {
- ow++;
- }
- foreach (Match b in Regex.Matches(bunch, "ace"))
- {
- ace++;
- }
- foreach (Match c in Regex.Matches(bunch, "ore"))
- {
- ore++;
- }
Add Comment
Please, Sign In to add comment