求找出错。。菜鸟问题
#include<stdio.h>int average(int a,int b,int c);
void main(void)
{
int a=1,b=2,c=3;
int a2=1234,b2=2345,c2=3456;
int a3=9876,b3=2345,c3=1;
int y= average(a,b,c);
int y2=average(a2,b2,c2);
int y3=average(a3,b3,c3);
printf("\nthe average is %d",y);
printf("\nthe average is %d",y2);
printf("\nthe average is %d",y3);
}
int average(int a,int b,int c)
{
return(a+b+c)/3
}