C语言指针编程
#include?int?max(int?a,?int?b)return?a>b?a:b;int?min(int?a,?int?b)return?a
C语言指针编程题,求大神解答
#include"stdio.h"
voidfun(inta[][6],intn,intm,int*odd,int*even)
{inti,j;
*odd=*even=0;
for(i=0;i
for(j=0;j
a[i][j]%2?*odd+=a[i][j]:*even+=a[i][j];
intmain()
{intn,m,i,j,a[5][6],odd,even;
for(i=0;i<5;i++)
{for(j=0;j<6;j++)
{a[i][j]=i*6+j+1;
printf("%4d",a[i][j]);
printf("\n");
fun(a,5,6,&odd,&even);
printf("奇数之和=%d\n偶数之和=%d\n",odd,even);
return0;