标题:求找出错。。菜鸟问题
取消只看楼主
平均数为零
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2012-7-23
结帖率:100%
已结贴  问题点数:5 回复次数:0 
求找出错。。菜鸟问题
#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

}

搜索更多相关主题的帖子: average void return 
2012-07-23 22:57



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-373971-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.138273 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved