120k views
0 votes
You are a psychologist who needs to provide a qualitative evaluation for IQ scores. Create a program that takes IQ scores (one at a time) and provides as output the following qualitative description: Under 100 = Below Average 100-119 = Average 120-160 = Superior Above 160 = Genius Include 2 void functions titled getIQ and printEvaluation, each with an int argument. • The function getIQ should have a Reference parameter that gets the IQ score in getIQ and then passes the value back to be printed in main( ), and • printEvaluation should have a Value parameter. 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. Output should be displayed as the following: "The entered IQ score of xyz is considered to be an assessment score based off of qualitative description." Where xyz is the score entered and assessment is Below Average, Average, Superior or Genius.

User Ingmars
by
6.3k points

1 Answer

4 votes

Answer:

Check the explanation

Step-by-step explanation:

#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:\\";

cin >> score;

return score;

}

void printEvaluation(int aScore)

{

cout << "IQ Score: " << aScore << " IQ Rating: ";

if (aScore <= 100)

{

cout << "Below Average\\";

}

else if (aScore <= 119)

{

cout <<"Average\\";

}

else if (aScore <= 160)

{

cout << "Superior\\";

}

else if (aScore >= 160 )

{

cout << "Genius\\";

}

}

User Diaa Den
by
6.3k points