Question: Write a C program that does the following: Asks the user to indicate the course they are enrolled in by inputting a single letter: '

Write a C program that does the following:
Asks the user to indicate the course they are enrolled in by inputting a single letter: 'C' or 'c' for COMP500, and 'E' or 'e' for ENSE501.
If the user input matches one of these options, print a message stating the course they are enrolled in.
If the user input does not match any of the valid options, print an error message indicating that the response was invalid.
Adhere to good programming standards, including proper use of whitespace, naming conventions, and comments. Test your program with a variety of inputs to ensure that it is robust and produces the expected output.
For example:
Input Result
c
Which course are you enrolled in, COMP500(C) or ENSE501(E)?
The user is enrolled in COMP500

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!