Answer:
Check the explanation
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:\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";
}
}
Answer:
3
Explanation:
The function floor() is used to give the integer which is smaller than or equal to the provided decimal value.
for example:
let a=5.8
floor(a);
the function provides the value 5 (smaller than or equal to 5.8).
In the given code:
variable num assigns the number 3.14.
then, floor(3.14) gives the value 3 (smaller than or equal to 3.14).
then, the echo print the value on the screen.
Therefore, the correct answer is 3.