2 Ejercicio de 30de10

download 2 Ejercicio de 30de10

If you can't read please download the document

description

java

Transcript of 2 Ejercicio de 30de10

#include #include using namespace std;void burbuja ( int X[], int imay){ int inter=1; //inter igual a 1 es x k el areglo no esta ordenado :) u.u //inter igual a 0 areglo ordenado :) u.u while ( inter == 1){ inter = 0; for (int i=0 ; iX[1+i]){ int temp =X[i]; X[i] =X[1+i]; X[1+i] = temp; inter =1;} } imay = imay-1; } }void muestra (int X[], int imay){ for ( int i=0; i