ASD
This commit is contained in:
parent
700f5f8bd0
commit
6fd8d2f990
BIN
du3/program
BIN
du3/program
Binary file not shown.
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user