アルゴリズムは訓練する - 最大値と最小値を

 

//最大値と最小値
書式#include <stdio.hに>
書式#include <stdlib.h>に含ま
#define MAXN 100 
int型は//関数カンプ(定数無効*、constの無効* b)は比較のために使用されます。
{
    リターン*(int型*) -  *(int型*)B;
}
INTメイン(){
	INT [MAXN]。
	INT、N = 11。
	(I ++; I <N I = 0の整数)のために
		scanf関数( "%のD"、および[I])。
	qsort(、N、はsizeof(INT)、COMP)。
	printf( "%D%D"、[N-1]、[0])。
	0を返します。
} 

  

おすすめ

転載: www.cnblogs.com/Hqx-curiosity/p/12237471.html