Return to Snippet

Revision: 30228
at August 10, 2010 10:35 by kentoy


Updated Code
int[] array = {n1, n2, n3, ... nn};
max = array[0];
for(int i = 0; i < array.length; i++) {
	if (array[i] > max) {
		max = array[i];
	}
}

Revision: 30227
at August 10, 2010 10:26 by kentoy


Initial Code
int[] array = {};
max = array[0];
for(int i = 0; i < array.length; i++) {
	if (array[i] > max) {
		max = array[i];
	}
}

Initial URL

                                

Initial Description

                                

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

Initial Tags
array

Initial Language
Other