VB icon

Student Average Grade Solver Using Classes in C++

Email
Submitted on: 8/31/2015 4:04:14 AM
By: Jake R. Pomperada  
Level: Beginner
User Rating: Unrated
Compatibility: C++ (general)
Views: 9784
author picture
 
     In this article I would like to share with you a program that I wrote before for my programming class in C++ I called this program student average grade solver using classes in C++. What does the program will do is to ask the name of the students, subject and its responding grade and then the program will compute the average grade of the student. If you have some questions about programming, about my work please send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com. People here in the Philippines can contact me at my mobile number 09173084360. Thank you very much and Happy Programming.

 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
				
//**************************************
// Name: Student Average Grade Solver Using Classes in C++
// Description:In this article I would like to share with you a program that I wrote before for my programming class in C++ I called this program student average grade solver using classes in C++. What does the program will do is to ask the name of the students, subject and its responding grade and then the program will compute the average grade of the student.
If you have some questions about programming, about my work please send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com. People here in the Philippines can contact me at my mobile number 09173084360.
Thank you very much and Happy Programming.
// By: Jake R. Pomperada
//**************************************

#include <iostream>
using namespace std;
class students {
public:
int grade[3];
string name;
char subjects[3][500];
};
main() {
students person;
int x=0,sum=0,solve_grade=0;;
cout << "\t\t Average Grade Solver 1.0";
cout << "\n\n";
cout << "Enter Student Name :";
getline(cin,person.name);
 for (x=0; x<3; x++) {
 cin.ignore();
 cout << "\nEnter Subject Name :";
gets(person.subjects[x]);
 cout << "Enter Subject Grades :";
 cin >> person.grade[x];
sum+= person.grade[x];
solve_grade=(sum/3);
 }
 cout << "\n=============================";
 cout << "\n Generated Report";
 cout << "\n=============================";
 cout << "\n";
 cout << "\n Student Name : " << person.name;
cout << "\n";
for ( x=0; x<3; x++) {
cout <<"\n Subject : " << person.subjects[x];
cout <<"\n Grade: " << person.grade[x];
}
cout << "\n\n";
cout << "Average Grade in 3 Subjects is "
 << solve_grade <<".";
cout << "\n\n";
system("pause");
}


Other 85 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments


 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.