class Program { public static void main(String[] argv) { int[] tomb = {3, 8, 2, 4, 5, 1, 6}; int n = 7; // A tömb elemeinek száma int max = tomb[0]; for(int i=0; i max) max = tomb[i]; System.out.println("Legnagyobb: " + max); } }