Question: Write a program that accepts 3 pieces of data (ID Number, # of hours taken, and # of credit points earned) for a student and

Write a program that accepts 3 pieces of data (ID Number, # of hours taken, and # of credit points earned) for a student and computes and prints the students GPA. The data is to be entered from the keyboard, with each loop producing one line of the output below.

Note: No array is needed since we just want to print output not store the data. So, each pass of the loop allows the user to enter data for a student, then prints that students output line. In order to not have the lines that prompt the user for input to get mixed into the output shown below, you will need to write the output shown below to a text file and copy the lines in the text file to this turn in sheet as your program output.

The data should be stored in the following structure type:

struct StudentType

{

int idNum,

creditPts,

creditHours;

double gpa;

}

Use the data below and format your output to appear as shown, with an additional column for GPA. Output should show the GPA with 2 decimal places.

Note: GPA is calculated as Credit Points divided by Credit Hours

ID Credit Points Credit Hours

1086 37 12

1198 124 37

9872 124 40

1112 124 46

2348 125 50

5577 312 125

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!