online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> using namespace std; void bubble(int a[], int n) { for(int i=0; i<n; i++){ for(int j=0; j<n-i-1; j++){ if(a[j]<a[j+1]){ swap(a[j],a[j+1]); } } } } int main(){ int n; cin>>n; int a[n]; for(int i=0; i<n; i++){ cin>>a[i]; } int sum; cin>>sum; bubble(a,n); for(int i=0; i<=n-3; i++){ for(int j=i+1; j<=n-2; j++){ for(int k=i+2; k<=n-1; k++){ int cs = a[i]+ a[j]+ a[k]; if(cs == sum){ cout<<a[i]<<","<<a[j]<<" and "<<a[k]<<endl; } } } } }

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