have 3 threshold values: 90, 80, 70; need to derive a function that returns a grade; the function takes 3 inputs: a, b, c corresponding to 3 threshold values and g the grade; the function should do the following: checks inputs are valid, if not valid returns N, if valid returns grade. Not sure this makes sense:
//Function definitions
float
isValid(int a, int b, int c, int g)
{
if (100 > a && a > b && b > c && c > 0)
float Grade;
if (a >= 90) {
Grade = A;
}
elseif (a >= 80 && a <= 89) {
Grade = B;
}
elseif (a >= 70 && a <= 79) {
Grade = C;
}
elseif (a <= 69) {
Grade = F;
}
return 1;
else {
Grade = 0.0;
}
return N;
}