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