VB icon

Student Grade Solver Using Two Dimensional Array in C++

Email
Submitted on: 11/4/2016 4:22:03 AM
By: Jake R. Pomperada  
Level: Beginner
User Rating: Unrated
Compatibility: C++ (general)
Views: 1841
author picture
 
     Here is a simple program that I wrote using C++ that will compute and evaluate the grades of the students using two dimensional array in C++ as our data structure. I hope you will find my work useful I am using Dev C++ as my C++ compiler and CodeBlocks as my C++ text editor in writing this program. Thank you. Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com. My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com. My mobile number here in the Philippines is 09173084360.
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
				
//**************************************
// Name: Student Grade Solver Using Two Dimensional Array in C++
// Description:Here is a simple program that I wrote using C++ that will compute and evaluate the grades of the students using two dimensional array in C++ as our data structure. I hope you will find my work useful I am using Dev C++ as my C++ compiler and CodeBlocks as my C++ text editor in writing this program. Thank you.
Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 
My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 
My mobile number here in the Philippines is 09173084360.
// By: Jake R. Pomperada
//**************************************

#include <iostream>
#include <iomanip>
using namespace std;
main() {
 int grades[5][1],pass=0,failed=0,out_range=0;
 int row=0, col=0;
 string remarks;
 char letter_grade;
 cout << "\t Grades Evaluator Version 1.0";
 cout << "\n\n Created By: Mr. Jake Rodriguez Pomperada,MAED-IT";
 cout << "\n\n";
 
 for ( row=0; row < 5; row++) {
for (col=0; col < 1; col++) {
 cout << "Enter grade : " ;
 cin >> grades[row][col];
 }
}
 // Code to check for remarks
cout <<"\n" << setw(5) << "GRADES" <<
setw(7) << " EQUIV " <<
setw(10) << "REMARKS";
cout << "\n\n";
 for ( row=0; row < 5; row++) {
for (col=0; col < 1; col++) {
 if (grades[row][col] >= 75) {
 remarks = "PASSED";
 pass++;
 }
 else if (grades[row][col] < 50)
 {
remarks= " Error Out of Range ";
out_range++;
 }
 else if (grades[row][col] < 75){
 remarks = "FAILED";
 failed++;
 }
 
 // Letter Grade Equivalent
 if (grades[row][col] >= 90 && grades[row][col] <= 100 ) {
letter_grade = 'A';
 }
 else if (grades[row][col] >= 80 && grades[row][col] <= 89 ) {
letter_grade = 'B';
 }
 else if (grades[row][col] >= 70 && grades[row][col] <= 79 ) {
letter_grade = 'C';
 }
 else if (grades[row][col] >= 60 && grades[row][col] <= 69 ) {
letter_grade = 'D';
 }
else if (grades[row][col] >= 50 && grades[row][col] <= 59 ) {
letter_grade = 'F';
 }
else if (grades[row][col] < 50) {
letter_grade = 'X';
 }
cout <<"\n" << setw(5) << grades[row][col]
 << setw(6) << letter_grade << setw(12)
 << remarks; 
 } 
 }
 
 cout << "\n\n";
 cout << "\nNumber of Passed Grades " << pass << ".";
 cout << "\nNumber of Failed Grades " << failed << ".";
 cout << "\nNumber of Out of Range Grades "<< out_range << ".";
 cout << "\n\n";
 system("PAUSE"); 
 
}


Other 69 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.