Snippet. Get Biggest IntegerThis snippet will find the biggest integer in an array of integers. int[] source = {1,2,3,4,5,6,7,8,9} int biggest_int = array[0]; for(int i = 0; i < array.length; i++) { if (array[i] > biggest_int) { biggest_int = array[i]; } } Updated on: 21 Dec 2024 |
|