21 lines
340 B
C
21 lines
340 B
C
#include <stdio.h>
|
|
|
|
int main(){
|
|
float vxod[999];
|
|
int i = 0;
|
|
float result = 0;
|
|
while(1){
|
|
float value = 0;
|
|
float r = scanf("%f", &value);
|
|
if(r == 1){
|
|
vxod[i++] = value;
|
|
}else{
|
|
for(int a = 1; a < i; a++)
|
|
result = vxod[0] * result + vxod[a];
|
|
printf("Vysledok je: %.2f\n", result);
|
|
break;
|
|
}
|
|
}
|
|
return 0;
|
|
}
|