Description: For a given percentile score, output the corresponding five-point score. Setting: 90 points and above is ' A '. 80-89 is divided into ' B ', 70-79 is ' C ', 60-69 divided into ' D ', 60 points for ' E ', illegal input, output error
For example, input: 87, output: B;
Input: 101, Output: ERROR
Run time limit: Unlimited
Memory Limit: Unlimited
Input: An integer
Output: Output five-point score. Output error when input is not valid
Example input: 87
Sample output: B
void* countresult (const int input)//returns the output string for coercion type conversion (char *)
{
if (input>100 | | input <0) {
return "ERROR"; You can print it directly here, you don't need to return
}else if (Input > 90) {
return "A";
}else if (Input > 80) {
return "B";
}else if (Input > 70) {
return "C";
}else if (Input > 60) {
return "D";
}else{
return "E";
}
}
Brush question 2--Five score