0
I cant print the name with the highest average
Write an OOP program in C++ for the student class that contain the following data members (ID, name, age, address, deg1, deg2, deg3, deg4, deg5, deg6, deg7) , define five students print their averages, then print the name of the student with the highest average ? https://code.sololearn.com/c1JmE0enijYm/?ref=app https://code.sololearn.com/c1JmE0enijYm/?ref=app
5 odpowiedzi
+ 6
Sure, I didn't saw cins in there.
Here I used a pointer to class information, so you can print data of choosen student without many if statements. I added function 'getName' too, beacuse 'string name' is private and you cannot use it outside the class.
I hope it's what you wanted.
https://code.sololearn.com/cwD1ZFWAY03e/?ref=app
+ 4
You didn't entered the values of degrees, you should assing default values in constructor.
+ 1
Thank you...
+ 1
صوج الله
0
No i used the cin direction
And why should i make it default