pvjc22/du3/program.c
Yaroslav Orlianskyi a52c984ed2 SAD
2022-03-17 16:38:10 +01:00

22 lines
318 B
C

#include <stdio.h>
int main(){
int c, result;
int value = 0;
int vxod[999];
int a = 0;
for(int i = 0; i < 4; i++){
c = scanf("%d",&value);;
vxod[i] = c;
a = i;
}
value = 0;
result = vxod[0];
do{
result = result * vxod[value] + 1;
value++;
}while(value < a);
printf("%d\n", result);
return 0;
}