Question: In Matlab. Use loops. 2. Create an algorithm to allow the user to enter a list of courses they have taken along with the grades
2. Create an algorithm to allow the user to enter a list of courses they have taken along with the grades received and the credit hours for each course, and then calculate the user's GPA. The program should first ask the user to type either Yes or No in response to the question, "Do you want to enter a grade?" If the answer is Yes, the user should be asked to enter the name of the course (text), the grade in the course (A, B, C, D, or F), and the number of credit hours for the course (a positive integer). If the user enters an invalid grade or an invalid number for the credit hours, he or she should be warned and asked to try again a maximum of th an appropriate error message should be generated and the program terminated. If they successfully enter the information for a course, the course name, the letter grade, and the credit hours should be displayed in a single row on the screen in an appropriate format, and then they should be asked again if they wish to enter a grade, and the entire process repeats if they answer Yes. If they answer No, the GPA should be calculated and displayed in an appropriate format, and then the program terminated unless no grades were entered (they typed No the first time) in which case an appropriate message should be generated and the program terminated. ree times, after which
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
