pvjc22/du3/program.c

21 lines
300 B
C
Raw Normal View History

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