Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

5. How would you describe your typical day at work?

Answered: 1 week ago

Question

7. What qualities do you see as necessary for your line of work?

Answered: 1 week ago