IQ Test program question - I'm confused...

Create a program that takes IQ scores and provides as output the following qualitative description:

Under 100=Below Average
100-119=Average
120-160=Superior
Above 160=Genius

The function getIQ should prompt the user for the IQ score, get the input from the user, and print the IQ score on the screen. The function printEvaluation should take the IQ score and print the qualitative evaluation on the screen.

Here is my program,

I am confused as to what exactly is meant by taking the IQ scores and printing the qualitative evaluation - Does it mean a like a table? Or something else?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include <iostream>
#include <iomanip>
using namespace std;
void getIQ();
void printEvaluation();
int score;
int &IQ = score;

void getIQ (int&) 
{
	cout << "Please enter your IQ Score to receive your IQ Rating:\n";
	cin >> score;
	
	if (IQ <= 100)
	{
		cout << "Your IQ rating " << score << " is below average.\n\n";
	}
	else if (IQ <= 119)
	{
		cout << "Your IQ rating " << score << " is average.\n\n";
	}
	else if (IQ <= 160)
	{
		cout << "Your IQ rating " << score << " is superior.\n\n";
	}
	else if (IQ >= 160 )
	{
		cout << "Your IQ rating " << score << " is genius.\n\n";
	}
}
void printEvaluation(int)
{
	cout << setw(10) << "IQ Score" << setw(12) << "IQ Rating" << endl;
	if (IQ <= 100)
	{
		cout << setw(8) << score << setw(14) << "Below Average\n";
	}
	else if (IQ <= 119)
	{
		cout << setw(8) << score << setw(14) << "Average\n";
	}
	else if (IQ <= 160)
	{
		cout << setw(8) << score << setw(14) << "Superior\n";
	}
	else if (IQ >= 160 )
	{
		cout << setw(8) << score << setw(14) << "Genius\n";
	}
}
int main()
{
 getIQ(score);
 printEvaluation(IQ);
 return 0;
}
closed account (48T7M4Gy)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include <iostream>
#include <iomanip>

using namespace std;

int getIQ(); // return the score
void printEvaluation(int);

int main()
{
    int IQ = 0;
    IQ = getIQ();
    
    printEvaluation(IQ);
    return 0;
}

int getIQ()
{
    int score = 0;
    cout << "Please enter your IQ Score to receive your IQ Rating:\n";
    cin >> score;
    
    return score;
}

void printEvaluation(int aScore)
{
    cout << "IQ Score: " << aScore << " IQ Rating: ";
    
    if (aScore <= 100)
    {
        cout << "Below Average\n";
    }
    else if (aScore <= 119)
    {
        cout <<"Average\n";
    }
    else if (aScore <= 160)
    {
        cout << "Superior\n";
    }
    else if (aScore >= 160 )
    {
        cout << "Genius\n";
    }
}
The irony of the thread title amuses me.


IQ scores are generally posted in buckets, so like 100 to 120 is "average" or whatever, 120-140 is "smart", 140-160 is really smart, etc. Maybe this is what they meant.
@jonnin --- That is apparently exactly what they meant.

thanks @kemort for the assistance.
Topic archived. No new replies allowed.