The exercise is to input a string from the user, and then output the following information: • Length of string (# of characters, including spaces and punctuation) • # of vowels in the string (a, e, i, o, u) • # of each vowel # of digraphs in the string (ai, ch, ea, ie, ou, ph, sh, th, wh) # of each digraph . Page 1 of 5
Control structures
Control structures are block of statements that analyze the value of variables and determine the flow of execution based on those values. When a program is running, the CPU executes the code line by line. After sometime, the program reaches the point where it has to make a decision on whether it has to go to another part of the code or repeat execution of certain part of the code. These results affect the flow of the program's code and these are called control structures.
Switch Statement
The switch statement is a key feature that is used by the programmers a lot in the world of programming and coding, as well as in information technology in general. The switch statement is a selection control mechanism that allows the variable value to change the order of the individual statements in the software execution via search.
F#
Requirements are NO loops NO variables
I have most of it done there are some errors i cant figure out.
This is what i have so far
![The exercise is to input a string from the user, and then output the following information:
- Length of string (# of characters, including spaces and punctuation)
- # of vowels in the string (a, e, i, o, u)
- # of each vowel
Page 1 of 5
- # of digraphs in the string (ai, ch, ea, ie, ou, ph, sh, th, wh)
- # of each digraph
For simplicity, only count lower-case vowels and digraphs. To help you get started, we are providing starter code that inputs a string from the user and calls a few functions that currently return 0:
### Code Example:
```plaintext
> dotnet run
Starting
input> this is a test
exploded: ['t'; 'h'; 'i'; 's'; ' '; 'i'; 's'; ' '; 'a'; ' '; 't'; 'e'; 's'; 't']
length: 0
vowels: 0
imploded: "this is a test"
Done
```
When your program is complete, here’s an example of how it should behave given the input: `"shush!" said the person on the train as i used my phone`
### Code Example:
```plaintext
> dotnet run
Starting
input> "shush!" said the person on the train as i used my phone
exploded: ['s'; 'h'; 'u'; 's'; 'h'; '!'; ' '; 's'; 'a'; 'i'; 'd'; ' '; 't'; 'h'; 'e'; ' '; 'p'; 'e'; 'r'; 's'; 'o'; 'n'; ' '; 'o'; 'n'; ' '; 't'; 'h'; 'e'; ' '; 't'; 'r'; 'a'; 'i'; 'n'; ' '; 'a'; 's'; ' '; 'i'; ' '; 'u'; 's'; 'e'; 'd'; ' '; 'm'; 'y'; ' '; 'p'; 'h'; 'o'; 'n'; 'e']
length: 50
vowels: 16
a: 2
e: 4
i: 3
o: 3
u: 3
digraphs: 6
ai: 2
sh: 2
th](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F672bf286-8abe-4b07-9ca1-0d5b2612956c%2Fcc80e564-a606-453f-bb06-86f94958ce74%2Fcy1ro9_processed.png&w=3840&q=75)

Trending now
This is a popular solution!
Step by step
Solved in 3 steps









