i am writing a program to use sat scores. i have a function called classify it r
ID: 3640955 • Letter: I
Question
i am writing a program to use sat scores. i have a function called classify it receives 3 interger parameters this function will now call a function named rateonescore.using this function ratesonescore,classify will rate each of the three scores one at a time there will be 3 calls to this function ,one for each score. ratesonescore will receive one parameter representing a sat score the function will determine which category the score is in less than 500 exactly 500 or above 500 how do i write these functions?Explanation / Answer
please rate - thanks
#include <iostream>
using namespace std;
void classify(int,int,int);
void rateonescore(int);
int main()
{int s1,s2,s3;
cout<<"Enter 3 SAT scores: ";
cout<<"enter 1st score: ";
cin>>s1;
cout<<"Enter 2nd score: ";
cin>>s2;
cout<<"Enter 3rd score: ";
cin>>s3;
classify(s1,s2,s3);
system("pause");
return 0;
}
void classify(int s1,int s2,int s3)
{rateonescore(s1);
rateonescore(s2);
rateonescore(s3);
}
void rateonescore(int s)
{if(s<500)
cout<<s<<" is less than 500 ";
else if(s==500)
cout<<s<<" is exactly 500 ";
else
cout<<s<<" is above 500 ";
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.