online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/****************************************************************************** Online Java Compiler. Code, Compile, Run and Debug java program online. Write your code in this editor and press "Run" button to execute it. *******************************************************************************/ import java.util.*; public class Main { public void duplicate(int n, int k[]) { for(int i=0; i<n; i++){ for(int j=i+1; j<n; j++){ if(k[i]==k[j]){ System.out.println(k[i]); } } } } public static void main(String[] args) { Scanner scan =new Scanner(System.in); int n=scan.nextInt(); int k[]= new int [n]; for(int i=0; i<n; i++){ k[i]=scan.nextInt(); } Main method = new Main(); method.duplicate(n,k); } }

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