pvjc22/du3/program.c
Yaroslav Orlianskyi d056e7850e SAD
2022-03-17 16:37:12 +01:00

22 lines
320 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;
results = vxod[0];
do{
result = results * vxod[value] + 1;
value++;
}while(value < a);
printf("%d\n", result);
return 0;
}