Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Basic Matrix
//Title of this code //'main' method must be in a class 'Rextester'. import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { System.out.println("Hello, World!"); System.out.print("Matriz de 6 * 6: "); new Rextester().mat( 6 ); } public void mat( int top ) { int[][] m = new int[ top ][ top ]; for( int i=0; i<m.length ; i++ ) { System.out.println(); for( int j=0; j<m.length; j++ ) { m[ i ][ j ] = 1 + new Random().nextInt( 15 ); System.out.print( m[ i ][ j ] + "\t" ); } } } }
run
|
edit
|
history
|
help
0
4.a
Reverse string template
rta
Kochergina_1
Counter.java
Charles Chung
LeetCode 121 - Best time to buy and sell stock - O(n) solution
3e
Fibonacci
1.6