Posted By

kentoy on 08/10/10


Tagged

array algorithm Vala


Versions (?)

Vala [Array] - Get the Largest Member of an int array


 / Published in: Other
 

  1. int[] array = {n1, n2, n3, ... nn};
  2. max = array[0];
  3. for(int i = 0; i < array.length; i++) {
  4. if (array[i] > max) {
  5. max = array[i];
  6. }
  7. }

Report this snippet  

You need to login to post a comment.