Actually, I am trying to upload the picture, but it does not work as well. So, i just gotta tell you my question and this should be the output on the screen:
Please enter in 5 string:
a b c d e
Please enter in another 5 strings:
q w e r t
STATS
Total character count of array A: 5
Vowel character count of array A: 2
Total character count of array B: 5
Vowel character count of array B: 1
Array A and Array B have same number of characters.
#include<iostream>
using namespace std;
int main()
{//you didn't specified which languague it is...
//but this will help you with logic
//declaring two string arrays with length 5
string A[5],B[5];
//reading input
cout<<"Please enter in 5 strings:";
for(int i=0;i<5;i++)
cin>>A[i];
cout<<"Please enter in another 5 strings:";
for(int i=0;i<5;i++)
cin>>B[i];
int cA=0,vA=0,cB=0,vB=0;//for vowel and character count
for(int i=0;i<5;i++)
for(int
j=0;A[i][j]!='\0';j++)//traversing through each string
{ cA++;//character
count..
if(A[i][j]=='a'||A[i][j]=='e'||A[i][j]=='i'||A[i][j]=='o'||A[i][j]=='u')
vA++;
else
if(A[i][j]=='A'||A[i][j]=='E'||A[i][j]=='I'||A[i][j]=='O'||A[i][j]=='U')
vA++;
}
for(int i=0;i<5;i++)
for(int
j=0;B[i][j]!='\0';j++)//traversing through each string
{ cB++;//character
count..
if(B[i][j]=='a'||B[i][j]=='e'||B[i][j]=='i'||B[i][j]=='o'||B[i][j]=='u')
vB++;
else
if(B[i][j]=='A'||B[i][j]=='E'||B[i][j]=='I'||B[i][j]=='O'||B[i][j]=='U')
vB++;
}
//printing result
cout<<"STATS\n";
cout<<"Total character count of array A:
"<<cA<<endl;
cout<<"Vowel character count of array A:
"<<vA<<endl;
cout<<"Total character count of array B:
"<<cB<<endl;
cout<<"Vowel character count of array B:
"<<vB<<endl;
if(cA==cB)cout<<"Array A and Array B have same number of
characters.\n";
else cout<<"Array A and Array B don't have same number of
characters.\n";
return 0;
}
output:

Actually, I am trying to upload the picture, but it does not work as well. So,...
How to replace elements in a 2D array? Okay so for my program, I am trying to create a fish tank. My program is to generate 4 different FISH: ><))'> in a tank of tilde (~) characters. The tank is a 2D array of 8 rows and 32 columns so it would look like ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for one of the eight rows (before I generate the random positions of the fish in the rank). Then one row could look like ~~~~~~~~~~><))'>~~~~~~~~~~~~~~~~...
I am trying to create a program called Count.java that contains a single method called compute with a string parameter called value. The method should count the number of newlines, words (any sequence of characters separated with whitespace), and characters in a given string and return an array of the three integer values. Use a Scanner to count the number of words in a string. The Scanner.next() method returns the next word, ignoring whitespace.
Use C++ language, keep it simple
Exercise #2: Strings' operations Write a C++ program that prompts the user to enter a sentence, the program then does the following: 1. Prints the total characters in the sentence. 2. Prints the word count of the sentence, assuming only one space between each tow words. 3. Prints total vowel (a, e, i, o, u) in the sentence. 4. Prints the vowel frequency as shown in the sample below. 5. Prints the sentence in...
// Write a program that determines how many of each type of vowel are in an entered string of 50 characters or less. // The program should prompt the user for a string. // The program should then sequence through the string character by character (till it gets to the NULL character) and count how many of each type of vowel are in the string. // Vowels: a, e, i, o, u. // Output the entered string, how many of...
I am having trouble trying to output my file Lab13.txt. It will
say that everything is correct but won't output what is in the
file. Please Help
Write a program that will input data from the file
Lab13.txt(downloadable
file);
a name, telephone number, and email
address.
Store the data in a simple local array to the main
module, then sort the array by the names. You should have several
functions that pass data by reference.
Hint: make your array large...
In python, PART A: I am trying to get a dictionary with size(4, 5, 6) as keys and an array for key containing a list of values (words from file of respective size) associated with those keys I am reading from a file of strings, where I am only interested with words of length 4, 5, and 6 to compute my program reading the text file line by line: At first, I have an empty dictionary then to that I...
I am reading a text file and trying to store the information into an array so I can use this in different parts of my program. So a dynamic array. So far I have been able to retrieve the information from the text file and organize it by category (User name,User ID, User password) I am having troubles allocating an array and storing the information correctly. Since I have different data types (int, string) do I need to create a...
Below I have my 3 files. I am trying to make a dog array that aggerates with the human array. I want the users to be able to name the dogs and display the dog array but it isn't working. //Main File import java.util.*; import java.util.Scanner; public class Main { public static void main(String[] args) { System.out.print("There are 5 humans.\n"); array(); } public static String[] array() { //Let the user...
Use c-strings for the following project: Write a C++ program that declares an array containing up to a maximum of 20 sentences, each sentence of maximum 81 characters long, using c-strings. Continue reading sentences from the user and store them in the array of sentences, until the user enters a NULL string for the sentence or 20 sentences have been entered. Then, one by one, display each sentence entered by the user and present the following menu of operations on...
How social media will be used in education in 2030?? Actually i am working on an project and trying to find a one good subtopic sentence for my thesis statement. And need to explain in 5 pages and need proper 5 links for each page. if anybody good with essay writing please help?