Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Max in 2D array
import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { int[][]array=new int[2][5]; int max; Scanner scan = new Scanner(System.in); for(int i=0; i<2; i++){ for(int z=0;z<5; z++){ array[i][z]= scan.nextInt(); } } max=array[0][0]; for(int i=0; i<2; i++){ for(int z=0;z<5; z++){ if (max<array[i][z]) max=array[i][z]; } } System.out.println(max); } }
run
|
edit
|
history
|
help
0
Test.java
Parse and flatten string
Intersection of Array
Main
3c
Rextester.java
jb14.0 lyambds
Ordenação de Vetores - LPI
Filter Iterator
moneda