Aktualizovat „du6/program.c“

This commit is contained in:
Bohdan Yanchyk 2020-04-16 08:16:13 +00:00
parent 0ff84e92d8
commit 8751183000

View File

@ -36,12 +36,21 @@ int main()
//int q = 0; //int q = 0;
size_t pocet_znakov = 0; size_t pocet_znakov = 0;
int antiInfC = 0; int antiInfC = 0;
//char r;
while (fgets(line,wSIZE,stdin)) { while (fgets(line,wSIZE,stdin)) {
if(antiInfC == SIZE - 1){ if((line[0] == '\n' || isalpha(line[0])!=0 ) && antiInfC == 1) {
break; break;
} else{
antiInfC++;
} }
antiInfC++;
// if (r == '\n') {
// break;
// }
// if(antiInfC == SIZE - 1){
// break;
// } else{
// antiInfC++;
// }
k = 0; k = 0;
pocet_znakov = strlen(line); pocet_znakov = strlen(line);
char* all = malloc(pocet_znakov); char* all = malloc(pocet_znakov);