From 376a9f16d27e03b11ac41467f97cc62ea1a4de40 Mon Sep 17 00:00:00 2001 From: Andrii Hermaniuk Date: Sun, 27 Mar 2022 15:19:33 +0200 Subject: [PATCH] aaa --- du4/program.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/du4/program.c b/du4/program.c index fbc8e67..0bbebde 100644 --- a/du4/program.c +++ b/du4/program.c @@ -5,15 +5,22 @@ int main(){ int ch=getchar(); char priklad[300]; + int count=0; for(int idx=0;1;idx++){ priklad[idx]=ch; + if(ch=='\n'){ + count++; + } ch=getchar(); - /*if(priklad[idx]!='\n'&&ch){ + if(priklad[idx]!='\n'&&ch!='\n'){ break; - }*/ + } } - char *start=priklad, *end=NULL; + +char *start=priklad, *end=NULL; + +for(int c=0;c