Thursday, September 10, 2020

Average Grade Solver Using if-else in C++

 A simple program to compute the average grade of the student using if-else statement using C++ programming language.

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.

My personal website is http://www.jakerpomperada.com

Program Listing

//  grade_average.cpp
//  A C++ program using arrays and if-else statement to
//  solve the average of the student
//  Author   : Jake Rodriguez Pomperada,MAED-IT,MIT
//  Website  : http://www.jakerpomperada.com
//  Email    : jakerpomperada@gmail.com
//  Location : Bacolod City, Negros Occidental Philippines


#include <iostream>

using namespace std;

int main()
{
        int mark[6];
        float sum=0.00,average=0.00;

        cout << "\n\n";
        cout << "\tAverage Grade Solver Using if-else in C++";
        cout << "\n\n";
        for(int a=0; a<6; a++)
        {
            cout<<"\nGive Grade[ "<<a+1<<" ] :: ";
                cin>>mark[a];
                sum+=mark[a];
        }

        average=(sum/6);
  
        cout << "\n\n"; 
        cout << "\tThe Average Grade is " <<average <<"\n\n";
        cout<<"\tYour Letter Grade is :: ";
        if(average>=90)
        {
                cout<<"[ A ]\n";
        }
        else if(average>70 && average<=80)
        {
                cout<<"[ B ]\n";
        }
        else if(average>60 && average<=70)
        {
                cout<<"[ C ]\n";
        }
        else
        {
                cout<<"[ D ]\n";
        }
        cout <<"\n\n";
        cout << "\tEnd of Program";
}

No comments:

Post a Comment