diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2023-12-07 06:02:32 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2023-12-07 06:02:32 +0000 |
commit | 1320205461cbc2c136b436796430f8806957b3d3 (patch) | |
tree | b6d1dea6b6bda0ee20cd66825058a4f5c2ef2dc8 | |
parent | f54bd42039a2ea5d9e4602f6b25c53f4348b14b6 (diff) |
Wed, Dec 6, 2023, 10:02 PM -08:00
-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); } |