online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <stdio.h> int main() { float a[15]={2,6,7.5,4.1,5,2.3,6.2,3,1.5,4.9,0.3,12,3,14,1.4}; int max=0; float buf=0; for(int i=0;i<15;i++){ for(int j=i;j<15;j++){ if(a[j]>a[max]){ max=j; } if(i!=max){ buf=a[i]; a[i]=a[max]; a[max]=buf; } } } for(int i=0;i<15;i++){ printf("%.1f ", a[i]); } 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