diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2023-12-07 06:10:42 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2023-12-07 06:10:42 +0000 |
commit | d5427084c0709702941577ce249b21b088369bc1 (patch) | |
tree | 080fc0728ad6a3d7e6372f15c308d970bea6d01e | |
parent | 6ae0557b8e77bc5226b39bdbe6b481eded1428f8 (diff) |
Wed, Dec 6, 2023, 10:10 PM -08:00
-rw-r--r-- | wk2/pset2/readability/readability.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/wk2/pset2/readability/readability.c b/wk2/pset2/readability/readability.c index 271f9fc..89f675e 100644 --- a/wk2/pset2/readability/readability.c +++ b/wk2/pset2/readability/readability.c @@ -15,7 +15,6 @@ int main(void) c = text[i]; int j = c; i++; - // printf("%i ", j); if (c == '.' || c == '!' || c == '?') { s++; @@ -34,7 +33,6 @@ int main(void) 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 < 1) { printf("Before Grade 1\n"); @@ -52,24 +50,3 @@ int main(void) } } } -/* - -*DONE* Your program must prompt the user for a string of text using get_string. - -*DONE* Your program should count the number of letters, words, and sentences - in the text. You may assume that a letter is any lowercase - character from a to z or any uppercase character from A to Z, - any sequence of characters separated by spaces should count as - a word, and that any occurrence of a period, exclamation point, - or question mark indicates the end of a sentence. - -Your program should print as output "Grade X" where X is the grade - level computed by the Coleman-Liau formula, rounded to the nearest - integer. - -If the resulting index number is 16 or higher (equivalent to or - greater than a senior undergraduate reading level), your program - should output "Grade 16+" instead of giving the exact index - number. If the index number is less than 1, your program should - output "Before Grade 1". -*/ |