write a c++ program to find the average grade for each student.the average will
ID: 3881991 • Letter: W
Question
write a c++ program to find the average grade for each student.the average will be find by the 3 tests that the user will input for each student and it will be divided by 3
inputs =name, lastname ,test 1 ,test 2, test 3
. use arrays for every input.
create an array for name, lastname ,test1, test2 ,test3. score averge.
must be between 0 and 100. Any other number it should send a message saying invalid number enter a new score.
outputs= find the average for each student,(add 3 test scores and divide by 3 to find average find the highest average, and lowest average use any type of loops, if ,else, switch , arrays, precison
MUSt use arrays , and typedef (for string data types)
the ouptut should have the name , last name , score for test 1, scores for test 2, score for test3, average grade.
and also calculate the highest average from all the students and the lowest average from all the students and ouput them.
Explanation / Answer
#include #include using namespace std; /* run this program using the console pauser or add your own getch, system("pause") or input loop */ class Student { public: char firstName[40]; char lastName[40]; int test3Score{}; int test2Score{}; int test1Score{}; float averageGrade{}; }; int main(int argc, char **argv) { int n, i; Student students[100]; cout > n; for (i = 0; iRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.