This commit is contained in:
Yaroslav Orlianskyi 2022-03-17 17:29:23 +01:00
parent d4121fe34b
commit 0b6c52741c
2 changed files with 9 additions and 11 deletions

Binary file not shown.

View File

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