Question: Lab Exercise 1: As a full-time student, you took three courses last term. Write, run, and test ac program on CodeWarrior (using Create New Project

 Lab Exercise 1: As a full-time student, you took three courses
last term. Write, run, and test ac program on CodeWarrior (using Create
New Project in Full Chip Simulation mode) that calculates and displays your

Lab Exercise 1: As a full-time student, you took three courses last term. Write, run, and test ac program on CodeWarrior (using Create New Project in Full Chip Simulation mode) that calculates and displays your grade point average (GPA) for the term out of 400 (to avoid fractional value). To make life a little simpler, just use the letter grades N (credit 400), 'W' (credit = 300), 'C' (credit - 200), and F (credit = 0). The grades earned and credit hours can be included in the program using arrays: char gradell, int cr hral Display a congratulatory message if GPA is higher than 350 and a warning if it is less than 200. Test the program for all three ranges of GPA. The GPA calculation can be done readily as follows: GPA = (credit[0] * cr hrs[0) + credit (1) cr hos[1] + credit(2) cr hrs/2))/(er hrsfo] + cr hos 1) + cr hrs[2]) (51943*2 points) You may use the following code fragment as a template: Hinclude "hcs12.h" Adefine COUNT 3 char gradell - (B', W// Test Case 1 Graden intcr heall 13, 1, 2); // Tent Case 1 Credit Hours int GPA I // Final 100 GPA char *mag // Message void main(void) int char *magl - "Good Grade" charmsg2 - "Work Harder char msg3 - "Doing OK for li - 01 COUNT) ) // Insert grade conversion and other calculation code here GPA wil // Enter the final CDA calculation here if (GPA > 350) Mag - magi? else if (GPA 350) Mag - magi? else if (GPA

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!