Question: c++ Create a program that defines a struct for a student. The following data should be part of the struct: studentID (int), gpa(double), fullName(string), units(int).

c++

Create a program that defines a struct for a student. The following data should be part of the struct: studentID (int), gpa(double), fullName(string), units(int).

Instantiate two students and have the user type in information for each, then print both back to the screen afterwards. Input validation: studentID should be positive and have 4 digits, GPA should be between 0 and 4 (inclusive), units should be positive. Have any invalid inputs reentered.

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!