2020-03-13 17:36:17 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include<ctype.h>
|
|
|
|
#include<math.h>
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
float x=0;
|
|
|
|
float value =0;
|
|
|
|
int count =0;
|
|
|
|
float arr[50];
|
|
|
|
while(scanf("%f",&value)!=EOF){
|
|
|
|
if(isalpha(value)!=0){
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if(count !=0){
|
|
|
|
arr[count-1]=value;
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
x=value;
|
|
|
|
}
|
|
|
|
count++;
|
|
|
|
}
|
|
|
|
value=0;
|
|
|
|
for(int i =0;i<count-1;i++){
|
|
|
|
value+=arr[count]*pow(x,count-2-i);
|
|
|
|
}
|
|
|
|
printf("Vysledok je :%f\n",value);
|
|
|
|
|
|
|
|
|
|
|
|
return 0;
|
2020-03-13 17:30:16 +00:00
|
|
|
}
|