26 lines
451 B
C
26 lines
451 B
C
#include <stdio.h>
|
|
|
|
int main() {
|
|
float pole[20];
|
|
int opakovania = 0;
|
|
float cislo;
|
|
|
|
while (opakovania < 20) {
|
|
if (scanf("%f", &cislo) == EOF) {
|
|
break;
|
|
}
|
|
pole[opakovania] = cislo;
|
|
opakovania++;
|
|
}
|
|
|
|
float vysledok = pole[1];
|
|
|
|
for (int i = 2; i < opakovania; ++i) {
|
|
vysledok = vysledok * pole[0] + pole[i];
|
|
}
|
|
|
|
printf("Vysledok je: %.2f\n", vysledok);
|
|
|
|
return 0;
|
|
}
|