Write C++ Console Application to calculate and display the average CGPA of 10 students with the following requirements.
1.Your program must use Class for student which have the following variables/attributes
1.Name
2.MatrixNo
3.Cgpa.
2.Your program should get information of 10 students Name,MatrixNo,Cgpa) from User and store it in Arrayof object of type Student (from item 1).
3.Then, your program must calculate and display the average CGPA from the Array(from item 2
1
Expert's answer
2013-03-18T10:49:16-0400
/*Write C++ Console Application to calculate and display the average CGPA of 10 students with the following requirements. 1.Your program must use Class for student which have the following variables/attributes 1.Name 2.MatrixNo 3.Cgpa. 2.Your program should get information of 10 students Name,MatrixNo,Cgpa) from User and store it in Arrayof object of type Student (from item 1). 3.Then, your program must calculate and display the average CGPA from the Array(from item 2*/ # include <iostream> # include < string> using namespace std; class stud{ protected: string name; string mat; double gpa; public: void get(){ cout<<"Name:"; getline(cin,name,'\n');
Comments
You're welcome. We are glad to be helpful. If you really liked our service please press like-button beside answer field. Thank you!
Thank you very much
Leave a comment