this is a progarm i have created to calculate srudent grades given the three grades. the computer then works out te average and assigns a grade depending if average is more than 50. the program stops after giving the average of the three grades and doesnt output whether pass of fail. can someone please help me fix this and let me know what i am doing wrong. thankyou.
coding shown below.
#include <iostream.h>
//function declarations
void inputNumbers(int&,int&,int&);
int calculateAverage(int,int,int);
void displayAverage(int);
void main()
{//start of function main
int number1, number2, number3, average;
inputNumbers(number1,number2,number3);
average= calculateAverage(number1,number2,number3);
displayAverage (average);
}//end of function main
//definition of function inputNumbers
void inputNumbers(int&number1,int&number2,int&number3)
{//start of function inputNumbers
cout<<"Enter first grade:";
cin>>number1;
//prompt for number 2
cout<<"Enter second grade:";
cin>>number2;
//prompt for number 3
cout<<"Enter third grade:";
cin>>number3;
}//end of function input numbers
//definition of function calculateAverage
int calculateAverage(int number1, int number2, int number3)
{//start of function calculateAverage
int average;
average= number1+number2+number3/3;
return average;
}//end of function calculateAverage
//definition of function displayAverage
void displayAverage(int average)
{//start of function displayAverage
cout<<"The Average of the three grades is "<<average;
}//end of function displayAverage
//assign whether pass or fail
char assignGrade(int average)
{
if (average > 50) {
cout << "Pass:";
}
else if(average == average) {
cout << "Pass:";
}
else {
cout << "Fail:";
cout << "Fail:";
}
}