online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <stdio.h> void stock(int A[],int n){ int B[n-1]; int max=A[1]-A[0]; for(int i=0;i<n-1;i++){ for(int j=i+1; j<n; j++){ B[i]=A[j]-A[i]; if(B[i]>max) max=B[i];} } printf("%d ",max); } int main() { int n; scanf("%d",&n); int A[n]; for(int i=0; i<n; i++) scanf("%d",&A[i]); stock(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