This commit is contained in:
Yaroslav Orlianskyi 2022-03-17 18:59:13 +01:00
parent 700f5f8bd0
commit 6fd8d2f990
2 changed files with 6 additions and 3 deletions

Binary file not shown.

View File

@ -4,7 +4,7 @@ int main(){
int result = 0; int result = 0;
int value = 0; int value = 0;
int vxod[999]; int vxod[999];
//int a = 0; int a = 0;
//int b = 999; //int b = 999;
for(int i = 0; i < 999; i++) for(int i = 0; i < 999; i++)
vxod[i] = 0; vxod[i] = 0;
@ -12,8 +12,11 @@ int main(){
scanf("%d",&value); scanf("%d",&value);
vxod[i] = value; vxod[i] = value;
} }
for(int i = 0; i < 999; i++){
for(int i = 1; i < 999; i++){ if(vxod[i] > 0)
a++;
}
for(int i = 1; i < a; i++){
result = vxod[0] * result + vxod[i]; result = vxod[0] * result + vxod[i];
} }
printf("Vysledok je: %d.00\n", result); printf("Vysledok je: %d.00\n", result);