Bubbling order method (C # version)

xiaoxiao2021-03-06  16

Int temp;

int [] InputValues ​​= New Int "

For (int i = 0; i <10; i )

{

InputValues ​​[I] = Convert.Toint32 (console.readline ());

}

For (int J = 0; j <9; j )

{

For (int i = 0; i <9; i )

{

IF (InputValues ​​[I]> InputVales [i 1])

{

Temp = InputValues ​​[i];

InputValues ​​[I] = INPUTVALUES [i 1];

INPUTVALUES [i 1] = TEMP;

}

}

}

For (int i = 0; i <10; i )

{

Console.writeline ("INPUTVALUES", I, INPUTVALUES [I]);

}

转载请注明原文地址:https://www.9cbs.com/read-41659.html

New Post(0)