Aktualizovat „du4/program.c“

This commit is contained in:
Bohdan Yanchyk 2020-04-03 07:28:00 +00:00
parent 95b8458898
commit 0673cb9613

View File

@ -75,9 +75,15 @@ char checkend(void){
if(c==EOF || c=='\n'){ if(c==EOF || c=='\n'){
int a=c; int a=c;
if((c=getchar())==EOF){ if((c=getchar())==EOF){
int b=c;
if((c=getchar())==EOF){
++count;
fseek(stdin,-count,SEEK_CUR);
return c;
}
++count; ++count;
fseek(stdin,-count,SEEK_CUR); fseek(stdin,-count,SEEK_CUR);
return c; return b;
} }
++count; ++count;
fseek(stdin,-count,SEEK_CUR); fseek(stdin,-count,SEEK_CUR);