diff --git a/du3/program b/du3/program index 865dc09..c6cec6b 100755 Binary files a/du3/program and b/du3/program differ diff --git a/du3/program.c b/du3/program.c index 1e21ff0..bbeedd1 100644 --- a/du3/program.c +++ b/du3/program.c @@ -1,21 +1,19 @@ #include int main(){ - int c, result; + int result = 0; int value = 0; int vxod[999]; - int a = 0; + //i`nt a = 0; for(int i = 0; i < 4; i++){ - c = scanf("%d",&value);; - vxod[i] = c; - a = i; + scanf("%d",&value);; + vxod[i] = value; + //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); return 0; }