Ejemplo n.º 1
0
 //Checks and returns word count in user sentence
 public static void ShowWordCount(RepeatCounter repeatCounter)
 {
     if (repeatCounter.ContainsWord())
     {
         int wordCount = repeatCounter.WordRepeatCount();
         Console.WriteLine(repeatCounter.WordInput + " shows ups " + wordCount + " times in your sentence");
     }
     else
     {
         Console.WriteLine("The word you entered cannot be found in the sentence you entered. Sorry!");
     }
 }