Write a C program to implement the following function"
print A for exam grades greater than or equal to 90, B for grades greater than or equal to 80 (but less than 90), C for grades greater than or equal to 70 (but less than 80), D for grades greater than or equal to 60 (but less than 70) and F for all other grades.
Here's what I've done:
include <stdio.h>
int main()
int grade;
if ( grade >= 90 ) {
printf( "A\n");
} // end if
else {
if ( grade >= 80 ) {
printf( "B\n");
}// end else
}
else {
if ( grade >= 70 ) {
printf( "C\n");
} //end else
}
else {
if ( grade >= 60 ) {
printf( "D\n");
} //end else
}
else {
printf("F\n");
}
WHAT'S WRONG?