28 lines
528 B
C
28 lines
528 B
C
#include <stdio.h>
|
|
|
|
int main(){
|
|
char riadok[999];
|
|
float vxod[999];
|
|
int i = 0;
|
|
float result = 0;
|
|
while(1){
|
|
|
|
int* r = *fgets(riadok,999,stdin);
|
|
if(*r != '\n')
|
|
vxod[i++] = *r;
|
|
/*else if(*r <= 255 && *r >= 0){
|
|
if(i != 0)
|
|
printf("Nepodarilo sa nacitat polynom na %d mieste.\n", i);
|
|
else
|
|
printf("Nepodarilo sa nacitat zaklad x\n");
|
|
break;
|
|
}*/else{
|
|
for(int a = 1; a < i; a++)
|
|
result = vxod[0] * result + vxod[a];
|
|
printf("Vysledok je: %.2f\n", result);
|
|
break;
|
|
}
|
|
}
|
|
return 0;
|
|
}
|