Write a program that deals with the grades of 10 courses for 15 students. a. Dec
ID: 3655962 • Letter: W
Question
Write a program that deals with the grades of 10 courses for 15 students. a. Declare a two?dimensional array; b. Initialize the array using randomly generated numbers (double data type) between 0 and 100; c. Print out the original array to the console; d. Calculate the avg grade by row for each student, and find the max and min grade for this students; e. Calculate the avg grade by column for each course, and find the max and min grade for this course; f. Define a void swap() which takes two double variables and exchanges the values of those two variables in the function body; (Hint: pass?by?reference or pass?by?value?) g. In main(), invoke swap() to exchange the real values of max and min for each student; h. Open a new file namedExplanation / Answer
/*you may also download the code form......http://www.2shared.com/file/qTtb8yPo/STUDENT.html*/ #include#include#include#include#include void swap(double &x,double &y) { double temp; temp=x; x=y; y=temp; } void main() { double student[15][10]; double student1[15][10]; double value; int intVal; int i,j; double sum; double max,min; clrscr(); ofstream fout; ifstream fin; fout.open("newArray.txt",ios::app); for(i=0;iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.