pvjc22/du3/program.c

22 lines
335 B
C
Raw Normal View History

2022-03-17 13:02:02 +00:00
#include <stdio.h>
int main(){
2022-03-17 19:15:29 +00:00
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{
for(int a = 1; a < i; a++)
result = vxod[0] * result + vxod[a];
printf("Vysledok je: %d.00\n", result);
break;
}
2022-03-17 16:29:23 +00:00
}
2022-03-17 13:02:02 +00:00
return 0;
}