Answered step by step
Verified Expert Solution
Question
1 Approved Answer
code in c++ : Q5: Consider the following structure definitions: struct student struct name char F Name [20]; char L_Name [20]; string reg_no; name student
code in c++ :
Q5: Consider the following structure definitions: struct student struct name char F Name [20]; char L_Name [20]; string reg_no; name student name; int marks [5]; float GPA; Ask the user to enter number of students and then create a dynamic array of students. Read all of the above data for all the students except GPA. For each student calculate GPA according to his/her average marks (considering the grading scheme mentioned below). For example :A student who obtained marks in five subjects as follows "60, 80, 90, 50, 60" will result in average marks of 68 and therefore his/her GPA will be "2.87" GPA Marks (Percentage) 4.00 90-100 3.62 80-89 70-79 3.10 2.87 60-69 1.80 50-59 0.00 Below 50 (1) After calculating GPA for each student, display first names (f_name) and registration number (reg_no) of all those students whose GPA is above 3.0 (2) Sort data of all students (for example using bubble sort) so that students getting a higher GPA are stored first as compared to the students getting a lower GPAStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started