23 lines
457 B
C
23 lines
457 B
C
#include <stdio.h>
|
|
|
|
int main() {
|
|
int input;
|
|
scanf("%i", &input);
|
|
printf("Your input was: %i\n", input);
|
|
|
|
char letter;
|
|
if ((input/10) >= 9) {
|
|
letter = 'A';
|
|
} else if ((input/10) >= 8) {
|
|
letter = 'B';
|
|
} else if ((input/10) >= 7) {
|
|
letter = 'C';
|
|
} else if ((input/10) >= 6) {
|
|
letter = 'D';
|
|
} else {
|
|
letter = 'F';
|
|
}
|
|
|
|
printf("Your letter grade is %c\n", letter);
|
|
return 0;
|
|
} |