Question: C++ language #include #include #include #include #include you can only use these 5 header files Thank you so much for helping!!!! Q4: [Program Development] {25%}

C++ language

#include

#include

#include

#include

#include

you can only use these 5 header files Thank you so much for helping!!!!

C++ language#include #include #include #include #include you can only use these 5

Q4: [Program Development] {25%} 1l'I'i'r-ite a program to read a sentence from the keyboard into a cstring using str [l] . The input contains at least one uppercaser'lowercase English letter. In addition, it may also contain space{s) I. 'I andfor some non-alphabet characters, e.g., '1', '6', ~ , etc. You may use strlen H from esh-Eng}, but do not use other mctions from this library in this question. Part {a}: Write in the Q4 t i to print the longest word in the input cstring. Two words are separated by a space. The length of one word is measured by the number of uppercaseflowerease English letters only, without the space[s) and non-alphabet characters. a Print the longest Word, i.e., the word that has the largest number of English letters. If there are multiple words having the same (longest) length, the first one should be printed. I Non-English letters should NUT be connted as part of a word and should be ignored, e.g., \"Cst" is treated as word \"C\" of length l, \"!x+ti-y\" is treated as Word \"try" of length 2, etc. c When you print the longest word, print the English letterts} only. Part {b}: We defnre a special feature of one word as follows: this word reads the same forward and boulevard, e.g., \"ftff' and \"ahcba\". For the word obtained in Part (a), please write mad { :I to print its smallest feature pattern by adding zero or several characters at its end as follows. I If this Word already has the special feature stated above, on (zero) character needs to he added and its smallest feature pattern is itself. For example, level and I are such words. I If this Word does not have such a feature, its smallest feature pattern is obtained by adding the smallest number of extra characters at its end. For example, the snrallest feature pattern of come is comatose, by adding mos at the end of some. Hint: You can reverse this word to determine the characters to be added. For example, the reversed Word of'coms is smart. Exam le-l r - inut value is underlined]: .nter a string: I #olome# from CS###### e first longest word is: some Its smallest feature pattern is: eomemoe Exam le-Z i at value is underlined : nter a string: level of robot power is ten he first longest word is: level ts smallest feature pattern is: level Example-3 (The input value is Underlined]: nter a string: {good afternoon} he first longest word is: afternoon ts smallest feature pattern is: afternoonretfa - END -

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 Programming Questions!