Question: Write a script that will, in a loop, prompt the user for four course numbers. Each will be a string of length 5 of the

 Write a script that will, in a loop, prompt the user

Write a script that will, in a loop, prompt the user for four course numbers. Each will be a string of length 5 of the form CS101'. These strings are to be stored in a character matrix. 3. Also provide an error message if a course number is not of lengt not store that number in the course matrix, but prompt the user for the next number. One approach is to use a while loop and check the length of the string entered h 5. The program should A sample output is shown below: Enter 5 character course number: cs101 Enter 5 character course number : EE233 Enter 5 character course number : me 17 Not 5 characters please re-enter number Enter 5 character course number mel177 Not 5 characters please re-enter number Enter 5 character course number: me117 Enter 5 character course number:core106 Not 5 characters - please re-enter number Enter 5 character course number: coreA The 4 courses are: cs101 EE233 mel17 coreA

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