From 5b551900e6cac52350a2cd5fe82dd11afbda1cef Mon Sep 17 00:00:00 2001 From: Andrii Hermaniuk Date: Fri, 4 Mar 2022 14:08:02 +0100 Subject: [PATCH] add file --- du1/program.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/du1/program.c b/du1/program.c index 13a5863..9fd2828 100644 --- a/du1/program.c +++ b/du1/program.c @@ -1,12 +1,15 @@ #include int main(){ - int counter=1, Sym; + int counter=0, Sym; char OutSym; while(1){ Sym=getchar(); - if(Sym==EOF || Sym==0){ + if(Sym==0){ + counter++; + } + if(Sym==EOF){ counter++; break; }