online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
import java.util.*; public class Main { public static void main(String[] args) { generateTab(); //wygenerowanie tablic [x] [y] displayTab(generateTab()); //wyswietlenie tablicy System.out.println("--------------------------------"); displayMin(getMin(generateTab())); } public static int[][] generateTab() { int[][] tab = new int[5][5]; Random r = new Random(107); for(int y=0; y<5;y++) { for(int x=0; x<5; x++) { tab[x][y] = r.nextInt(11)-5; } } return tab; } public static int[] getMin(int tab[][]) { int[] minTab = new int[5]; int min = Integer.MAX_VALUE; for(int x=0; x<5; x++) { min = 999999999; for(int y=0;y<5;y++) { if (tab[x][y] < min) { min=tab[x][y]; minTab[x]=min; } } } return minTab; } public static void displayTab(int tab[][]){ for (int y=0; y<5; y++) { for (int x=0; x<5; x++) { System.out.print(tab[x][y] + " "); } System.out.println(); } } public static void displayMin(int tab[]) { for (int x=0; x<5; x++) { System.out.print(tab[x] + " "); } System.out.println(); } }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue