Thursday, October 10, 2019

Average Grade Solver Using One Dimensional Array in C++

A program that I wrote a very long time ago I called this program Average Grade Solver Using One Dimensional Array in C++.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.


Program Listing

average.cpp

#include <iostream>

using namespace std;


main() {
    int grade[3],sum=0,solve_grade=0;
    string name;
    char subjects[3][500];
    int x=0;

    cout << "\t\t Average Grade Solver 1.0";
    cout << "\n\n";

    cout << "Enter Student Name :";

    getline(cin,name);
      for (x=0; x<3; x++) {
         cin.ignore();
          cout << "\nEnter Subject Name :";

           gets(subjects[x]);
          cout << "Enter Subject Grades  :";
          cin >> grade[x];
            sum+= grade[x];
            solve_grade=(sum/3);
      }
      cout << "\n=============================";
      cout << "\n     Generated Report        ";
      cout << "\n=============================";
      cout << "\n";
      cout << "\n Student Name : " << name;
        cout << "\n";
        for ( x=0; x<3; x++) {

            cout <<"\n Subject : " << subjects[x];
            cout <<"\n Grade   : " << grade[x];
       }

        cout << "\n\n";
        cout << "Average Grade in 3 Subjects is  "
             << solve_grade <<".";
        cout << "\n\n";
        system("pause");
}

No comments:

Post a Comment