1
Answer

array of string

Ask a question
Joseph

Joseph

13y
1.7k
1
For This program i have no idea what to do, if guys don`t mind, help pls... thank you.

  • Use a loop to force the user to enter valid integer in the range 2 to 5 inclusive, and handle all exceptions.
  • The program will then input the strings into the array.
  • Find and display the shortest string stored in the array.
  • Display the strings that are stored in the array in reverse order,
  • As well, display string length for each string as shown below.
Here is an example of the program running:

How many strings do you wish to enter: 3

Enter string #1: Cats and rats
Enter string #2: just rats
Enter string #3: rats

The shortest strings is "rats"

rats 4
just rats 9
Cats and rats 13

Answers (1)
Next Recommended Forum