Изменил(а) на 'du3/program.c'

This commit is contained in:
Vladyslav Korzun 2023-03-06 18:54:18 +00:00
parent 38fcde55b5
commit 4aef4e93c7

View File

@ -21,18 +21,25 @@ int main(){
//float p = 0;
while(stop == 0){
r = fgets(riadok,LINE_SIZE,stdin);
if(feof(stdin)){
stop = 1;
r2 = atof(riadok);
mass[i] = r2;
i++;
}
pos++;
if (r == NULL || !isdigit(*r) || feof(stdin)) {
if (r == NULL || !isdigit(*r)) {
//printf("%d", *r);
if(*r == 10){
stop = 1;
}
if(feof(stdin)){
/*if(feof(stdin)){
stop = 1;
r2 = atof(riadok);
mass[i] = r2;
i++;
}
}*/
else{
if(pos > 0){
printf("Nepodarilo sa nacitat polynom na %d mieste.\n", pos);