online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <stdio.h> void distinctElement(int A[],int n){ int count=0; for(int i=0; i<n; i++){ for(int j=i+1; j<n; j++){ if(A[i]==A[j]){ count+=1; break; } } } int res=n-2*count; printf("%d",res); } int main() { int n; scanf("%d",&n); int A[n]; for(int i=0;i<n;i++) scanf("%d",&A[i]); distinctElement(A,n); return 0; }

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