online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
//Ejercicio propuesto 1: Implemente el algoritmo de la burbuja de manera que los elementos ordenados queden de mayor a menor. #include<iostream> using namespace std; int main(){ int numeros[10]={9,8,7,6,5,4,3,2,1,10}; int aux; for (int i=0; i<=9; i++){ for (int j=0; j<=9; j++){ if(numeros[j]>numeros[j+1]){ aux = numeros[j]; numeros[j]= numeros[j+1]; numeros[j+1]=aux; } } } for(int i=0; i<=9; i++){ cout<<numeros[i]<<" "; } cout<<endl<<"Elementos de mayor a menor: "<<endl; for( int i=9; i>=0; i--){ cout<<numeros[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