Joseph

Joseph

  • NA
  • 14
  • 17.3k

array of string

Apr 20 2011 8:34 PM
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)