//编写一个函数:tt指向一个M行N列的二维数组,求出二维数组每列中最小的元素,并依次放入pp所指的一维数组中.二维数组中的数在主函数中赋予. //重难点:求出的是每一列的最小值,这里要注意,学会简化代码,省去一些多余定义的变量. #include <stdio.h> #define M 3 #define N 4 void fun ( int tt[M][N], int pp[N] ) { //简化代码 int i, j;//不定义变量n,使用i即可.不定义min直接赋值给pp即可. ; i
#include <stdio.h> #define sum 3+4//宏定义是原封不动的使用used for test4 #include <time.h>//used for test8~9 #include <stdlib.h>//used for test8~9 void test(){//数组输出 //int a[5]={1,2,3,4,5}; printf("array output,look,please...\n"); int a[1