U E D R , A S I H C RSS

새싹교실/2017/내무반/조현민/BubbleSort (rev. 1.1)

새싹교실/2017/내무반/조현민/Bubble Sort


int main()
{
int arr[] = { 55,07,78,12,42 };
int arr_len = sizeof(arr) / sizeof(int);
int temp = 0;

for (int i = 0; i < arr_len - 1;i++) {
for (int j = 0; i < arr_len - 1 - i; j++) {
if (arrj > arrj + 1) {

temp = arrj;

arrj = arrj + 1;

arrj + 1 = temp;

}
}
}

for (int i = 0; i < arr_len; i++) {

printf("%d", arri);

}

return 0;
}
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:30:07
Processing time 0.0270 sec