Código
#include <iostream> using namespace std; int main(int argc, char *argv[]) { const int TAM = 4; int listado[TAM]; listado[1] = 11; listado[2] = 13; listado[3] = 53; listado[4] = 12; int temp; for(int x = 1; x < TAM; x++){ for(int s = 1; s < TAM; s++){ if(listado[s] > listado[s+1]){ temp = listado[s]; listado[s] = listado[s+1]; listado[s+1] = temp; } } } for(int g = 1; g < 5; g++){ cout << listado[g] << endl; } return 0; }