From c36c240319e40b25401e40b1aa85af82a46a70ca Mon Sep 17 00:00:00 2001 From: Rushil Umaretiya Date: Mon, 5 Feb 2024 03:10:45 -0500 Subject: [PATCH] chore: formatting --- 1-lower/lower.c | 5 +++-- 3-truncator/truncator.c | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/1-lower/lower.c b/1-lower/lower.c index 1c22f11..6e1b142 100644 --- a/1-lower/lower.c +++ b/1-lower/lower.c @@ -1,13 +1,14 @@ // PID: 730677144 // I pledge the COMP 211 honor code. -#include #include +#include int main() { char c; while ((c = getchar()) != EOF) { - if (64 < c && c < 91) c += 32; + if (64 < c && c < 91) + c += 32; putchar(c); } } diff --git a/3-truncator/truncator.c b/3-truncator/truncator.c index adf3025..267c212 100644 --- a/3-truncator/truncator.c +++ b/3-truncator/truncator.c @@ -1,8 +1,8 @@ // PID: 730677144 // I pledge the COMP 211 honor code. -#include #include +#include int main() { int lines[100]; @@ -11,16 +11,16 @@ int main() { total = 0; chars = 0; cur = 0; - + while ((c = getchar()) != EOF) { chars++; if (c == '\n') { - chars = 0; + chars = 0; cur++; putchar(c); } else if (chars > 50) { - if (total == 0 || lines[total-1] != cur) { + if (total == 0 || lines[total - 1] != cur) { lines[total] = cur; total++; }