diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2023-12-07 06:00:22 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2023-12-07 06:00:22 +0000 |
commit | f54bd42039a2ea5d9e4602f6b25c53f4348b14b6 (patch) | |
tree | 4d3158eb603690ea3729a817768bb27c195f6e36 /wk2/pset2 | |
parent | daa3e081633ec3d72e5b024afde45253e7b2b7bf (diff) |
Wed, Dec 6, 2023, 10:00 PM -08:00
Diffstat (limited to 'wk2/pset2')
-rw-r--r-- | wk2/pset2/readability/readability.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/wk2/pset2/readability/readability.c b/wk2/pset2/readability/readability.c index 0967c94..ab66ed3 100644 --- a/wk2/pset2/readability/readability.c +++ b/wk2/pset2/readability/readability.c @@ -28,15 +28,15 @@ 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); + //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); - index = round(index); - printf("Grade: %f\n", index); + //printf("L: %f, S: %f, Grade: %f\n", L, S, index); + int ans = round(index); + printf("Grade: %i\n", ans); } /* |