diff options
Diffstat (limited to 'wk2/pset2')
-rw-r--r-- | wk2/pset2/readability/readability.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/wk2/pset2/readability/readability.c b/wk2/pset2/readability/readability.c index ab66ed3..c04a66a 100644 --- a/wk2/pset2/readability/readability.c +++ b/wk2/pset2/readability/readability.c @@ -28,13 +28,14 @@ int main(void) { l++; } - }Congratulations! Today is your day. You're off to Great Places! You're off and away! + } while (c != '\0'); //printf("s: %f w: %f l: %f\n", s, w, l); float L = (float)(l / w) * 100; float S = (double)(s / w) * 100; float index = 0.0588 * L - 0.296 * S - 15.8; //printf("L: %f, S: %f, Grade: %f\n", L, S, index); + if (index) int ans = round(index); printf("Grade: %i\n", ans); } |