Red de conocimiento informático - Problemas con los teléfonos móviles - Problemas de programación Vc

Problemas de programación Vc

El siguiente es un programa de clasificación de burbujas:

# include & ltiostream.h & gt

void bubble(int data[], int length)

{

int segmento;

int bucle;

temperatura interna;

for(segmento = 0; segmento<=longitud- 2; segmento= segmento+1){

for(bucle = longitud-2; bucle & gt=segmento; bucle=bucle-1){

if(datos[bucle] & gt;datos [bucle+1]){

temp = datos[bucle];

datos[bucle]= datos[bucle+1];

datos[bucle +1]= temp;

}

}

}

Regresar;

}

int main()

{ int a[10];

int I

for(I = 0; i & lt10;i++; )

CIN & gt;& gta[I];

Burbuja(a, 10);

for(I = 0; i<10;i++)

{ cout & lt& lta[I]& lt;& ltendl

}

return 0;

}