diff --git a/letter-grade.c b/letter-grade.c index 7123716..69f8527 100644 --- a/letter-grade.c +++ b/letter-grade.c @@ -1,9 +1,13 @@ #include +#include int main() { - int input; - scanf("%i", &input); - printf("Your input was: %i\n", input); + char inputText[4]; + fgets(inputText, 4, stdin); + printf("inputText: %s\n", inputText); + long int input; + input = strtol(inputText, NULL, 0); + printf("input: %i\n", input); if ((input >= 0) && (input <= 100)) { char letter; @@ -35,4 +39,4 @@ int main() { } return 0; -} \ No newline at end of file +}