From 6f764285ad51e6ea14da9922de5e1b81b637f343 Mon Sep 17 00:00:00 2001 From: ceccs17d45 <44408507+ceccs17d45@users.noreply.github.com> Date: Sat, 12 Oct 2019 19:12:36 +0530 Subject: [PATCH 1/2] Update digit_count.c --- digit_count.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/digit_count.c b/digit_count.c index 813f7fa..4387bde 100644 --- a/digit_count.c +++ b/digit_count.c @@ -1,6 +1,6 @@ #include -main() +main() // main function starts// { int c, i, nwhite, nother; int ndigit[10]; @@ -9,7 +9,7 @@ main() for(i = 0; i < 10; i++) ndigit[i] = 0; - while ((c = getchar()) != EOF) + while ((c = getchar()) != EOF) // while loop starts// if(c >= '0' && c <= '9') ++ndigit[c-'0']; else if (c == ' ' || c == '\n' || c == '\t') @@ -20,5 +20,5 @@ main() printf("digits ="); for(i = 0; i < 10; ++i) printf(" %d", ndigit[i]); - printf(", whitespace = %d, other = %d\n", nwhite, nother); + printf(", whitespace = %d, other = %d\n", nwhite, nother); // printing result// } From d306bd6a4b9520dd75034ca55f168034fd98c942 Mon Sep 17 00:00:00 2001 From: ceccs17d45 <44408507+ceccs17d45@users.noreply.github.com> Date: Sat, 12 Oct 2019 19:20:15 +0530 Subject: [PATCH 2/2] Update calc.c --- calc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/calc.c b/calc.c index 66408e2..93b7afc 100644 --- a/calc.c +++ b/calc.c @@ -11,7 +11,7 @@ int getop(char[]); void push(double); double pop(void); -int main() +int main() // main function// { int type; double op2; @@ -118,7 +118,7 @@ int getch(void) } -void ungetch(int c) +void ungetch(int c) // function// { if(bufp >= BUFSIZE) printf("ungetch: toomany characters\n");