K
Keith
Hey Guys,
Can you help me understand this concept? I am trying to use function
qualityPoints here to return a value of 4 if an average is 90-100, 3 if it
is 80-90, 2 if its 70-80, 1 if its 60-70 and 0 if it drops below 60. I am
learning functions and trying to figure out what values should be between
the parentheses in the initializing phase, and also how it should be
written. I am on a mental block on this one. Here's what I have so far:
//Program returns the GPA based on student average
include <iostream>
include <cmath>
using std::cout;
using std::cin;
using std::end1;
int qualityPoints ( int, int, int, int, int, int )
int main() //function main begins program execution
{
int average; //student average
int GPA; //grade point average
cout << "Enter the student's average:";
cin >> average;
cout << "Grade Point Average Is:";
<< qualityPoints ( GPA ) << end1;
getch (); //indicates successful termination
}
//function qualityPoints definition
int qualityPoints (
Thanks for your help!
Can you help me understand this concept? I am trying to use function
qualityPoints here to return a value of 4 if an average is 90-100, 3 if it
is 80-90, 2 if its 70-80, 1 if its 60-70 and 0 if it drops below 60. I am
learning functions and trying to figure out what values should be between
the parentheses in the initializing phase, and also how it should be
written. I am on a mental block on this one. Here's what I have so far:
//Program returns the GPA based on student average
include <iostream>
include <cmath>
using std::cout;
using std::cin;
using std::end1;
int qualityPoints ( int, int, int, int, int, int )
int main() //function main begins program execution
{
int average; //student average
int GPA; //grade point average
cout << "Enter the student's average:";
cin >> average;
cout << "Grade Point Average Is:";
<< qualityPoints ( GPA ) << end1;
getch (); //indicates successful termination
}
//function qualityPoints definition
int qualityPoints (
Thanks for your help!