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


/ Published in: Other
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.