Select sort archive

xiaoxiao2021-03-06  71

#include

Void swap (int * a, int * b) {INT C = * a; * a = * b; * b = C;}

// Simple Select Sort Void SelectSort (int A [], int N) {INT I, J; for (j = n-1; j> -1; - j) {for (i = 0; i a [j]) swap (& a [i], & a [j]);}}}

INT main () {Int Num [[100]; INT N, I; SCANF ("% D", & n); for (i = 0; i

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

New Post(0)