Question: Declare a scalar variable named Words having a data type of String. Initialize the variable so that it contains a sentence or two. Declare a

Declare a scalar variable named Words having a data type of String. Initialize the variable so that it contains a sentence or two. Declare a one-dimensional array named LetterCount, having a data type of Integer and 26 elements (one element for each letter of the alphabet). Write the statements to count the number of instances of each letter of the alphabet by examining each character in the string. If the character is the letter a, increment the value of the first element in the second array; if the character is the letter b, increment the value of the second element in the second array; and so on. Perform the count in a case-insensitive way. Assume that the string contains only letters. In a control of your choosing, write the statements to display each letter and the count of the letter.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!