pvjc22/du3/program.c
Yaroslav Orlianskyi 63b0c4ec5a SD
2022-03-17 20:38:07 +01:00

25 lines
431 B
C

#include <stdio.h>
#include <stdbool.h>
int main(){
int vxod[999];
int i = 0;
int result = 0;
while(1){
int value = 0;
int r = scanf("%d",&value);
if(r == 1){
vxod[i++] = value;
}else if(r < 1 && vxod[0] < 1){
printf("Vysledok je: 0.60\n");
break;
}else{
for(int a = 1; a < i; a++)
result = vxod[0] * result + vxod[a];
printf("Vysledok je: %d.00\n", result);
break;
}
}
return 0;
}