I don't know how to find the sentence with the least number of words, I figure out how to count the words, but I don't know how to use strlen and strcpy to find sentence with the least number of words. Hope someone can help! Here is the text of the assignment (I only need how to find a name with the least number of words):
Create a field of 'N' animal shelter names. Find a name with the least number of words and copy it to a string'AZN'. In the 'AZN' string, transform every second letter of the first word into a capital letter.
In the function 'ko' find the sum of ASCII codes of the changed string 'AZN'. In the function 'np' transform the sum of ASCII codes into a system with a base of 22. Create a 1D dynamic field 'Z' in which you will input the number of characters of every word from the 'AZN'.Print the name field, transformed 'AZN' string, newly created equivalent with a base of 22 and the 'Z' dynamic field.
cout << "Enter the number of shelter: ";
cin >> n;
int *Z=new int [n];
cout << "Enter the name of the " << i+1 << ". shelter: ";