lundi 16 mars 2015

Trying to wrap my head around 3 nested if statments

Say I have an array of 5 strings and that related to that array is 3 arrays of integers all of the same size. e.g.`



String a[] = new String[5]
int x[] = new int[5]
int y[] = new int[5]

int z[] = new int[5]


so that a[0],x[0],y[0],z[0] are all related to the same thing. I want to find out which index(es) in x[] hold the highest number. If more than one those has the same highest number then which of those has the highest number in y[] and if there is more than one with the same highest number which one would have the highest in z[](Its safe to assume that none would have the same max value in z[]


I've tried to explain as best I can..


Aucun commentaire:

Enregistrer un commentaire