2022-03-18 12:13:19 +00:00
|
|
|
#include <stdio.h>
|
2022-03-18 12:14:12 +00:00
|
|
|
|
|
|
|
int main(){
|
|
|
|
float cislo[999];
|
2022-03-18 12:15:37 +00:00
|
|
|
int i, b = 1;
|
2022-03-18 12:14:12 +00:00
|
|
|
float vysledok = 0;
|
|
|
|
do{
|
|
|
|
float c = 0;
|
|
|
|
float d = scanf("%f", &c);
|
|
|
|
if(d == 1)
|
|
|
|
cislo[i++] = c;
|
|
|
|
else if(d <= 255 && d >= 0){
|
|
|
|
if(i != 0)
|
|
|
|
printf("Nepodarilo sa nacitat polynom na %d mieste.\n", i);
|
|
|
|
else
|
|
|
|
printf("Nepodarilo sa nacitat zaklad x\n");
|
|
|
|
break;
|
|
|
|
}else{
|
|
|
|
while(b < i){
|
|
|
|
vysledok = cislo[0] * vysledok + cislo[b];
|
|
|
|
b++;
|
|
|
|
}
|
|
|
|
printf("Vysledok je: %.2f\n", vysledok);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}while(1);
|
|
|
|
return 0;
|
|
|
|
}
|