Оновити 'cv3/program.c'

This commit is contained in:
Kapliuk 2024-03-06 18:26:42 +00:00
parent 6ccd3659ee
commit 75ec7c77e3

View File

@ -11,7 +11,7 @@ int main(){
fgets(line, 100, stdin);
x = strtod(line, NULL);
cf1 = ceil(x);
if(cf1 == 0 && line[0] != '\n'){
if(cf1 == 0 && line[0] != '\n' && x != 0.0){
printf("Nepodarilo sa nacitat zaklad x\n");
return 1;
}
@ -21,7 +21,7 @@ int main(){
fgets(line, 100, stdin);
cf = strtod(line,NULL);
cf1 = ceil(cf);
if(cf1 == 0 && line[0] != '\n'){
if(cf1 == 0 && line[0] != '\n' && cf != 0.0){
printf("\nNepodarilo sa nacitat polynom na %d mieste.\n", cfIdx);
return 1;
}