pvjc22/du3/program.c

20 lines
311 B
C
Raw Normal View History

2022-03-17 13:02:02 +00:00
#include <stdio.h>
int main(){
2022-03-17 16:29:23 +00:00
int result = 0;
2022-03-17 15:35:56 +00:00
int value = 0;
2022-03-17 15:02:06 +00:00
int vxod[999];
2022-03-17 16:29:23 +00:00
//i`nt a = 0;
2022-03-17 15:35:56 +00:00
for(int i = 0; i < 4; i++){
2022-03-17 16:29:23 +00:00
scanf("%d",&value);;
vxod[i] = value;
//a = i;
}
//result = vxod[0];
for(int i = 1; i < 4; i++){
result = vxod[0] * result + vxod[i];
2022-03-17 15:02:06 +00:00
}
2022-03-17 15:35:56 +00:00
printf("%d\n", result);
2022-03-17 13:02:02 +00:00
return 0;
}