// ricerca all’insù
found = false;
for (int i = 0; i < a.length; i++)
if (a[i] == e) {
z = i; found = true;}
// ricerca all’ingiù
found = false;
for (int i = a.length - 1; i >= 0; i--)
if (a[i] == e) {
z = i; found = true;}
| Previous slide | Next slide | Back to first slide | View graphic version |