Question
Word Counter, Starting out with Visual C# 2012 3rd Edition Develop an application that includes a method that accepts a string as an argument and
Word Counter, Starting out with Visual C# 2012 3rd Edition
Develop an application that includes a method that accepts a string as an argument and returns the number of words it contains. For instance, if the argument is "Four score and seven years ago," the method should return the number 6. The application should let the user enter a string, and then it should pass the string to the method. The number of words in the string should be displayed....the picture I have attached is how my instructor would like the program to look, although the example program seems to be wrong because when i typed "Four score and seven years ago" the number of words it returned was 5 when it should have be 6.
Programa 1 Enter a string: four score and seven years ago Number of words 5 Count WordsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started