Linear sort

xiaoxiao2021-03-06  81

#include

Typedef int Arr [10];

Void Read_arr (Arr g) {INT i; for (i = 0; I <10; I ) {Printf ("please input the number% d:", I); scanf ("% d", (g i) }}

Void Display_arr (Arr H) {INT I; For (i = 0; I <10; i ) {printf ("% D", * (h i)); printf ("/ n");}} void sort_arr (Arr f, int, int, int, int) {INT I, J, T; for (i = 9; i> 0; I -) for (j = 0; j

INT LAG (INT A, INT B) {IF (A> B) Return 1; Else Return 0;}

Void main (void) {Arr K;

Read_arr (k); sort_arr (k, lag); Display_arr (k);}

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

New Post(0)