为了账号安全,请及时绑定邮箱和手机立即绑定

各位大神帮帮忙!小弟初学,需要各位的指导

各位大神帮帮忙!小弟初学,需要各位的指导

C
慕慕6466544 2017-03-12 13:24:35
怎样编写一个比较三个数大小的c程序,各位大哥请多多请教
查看完整描述

1 回答

已采纳
?
田心枫

TA贡献1064条经验 获得超383个赞

# include <stdio.h>
void main()
{
	int max(int x,int y,int z);
	int a,b,c,d;
	scanf("%d%d%d",&a,&b,&c);
	d=max(a,b,c);
	printf("max = %d\n",d);
}
int max(int x,int y,int z)
{
	int m ,n;
	if(x>y) m = x;
	else m = y;
	if(m>z) n = m;
	else n = z;
	return(n);
}


查看完整回答
1 反对 回复 2017-03-12
  • 1 回答
  • 0 关注
  • 1007 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信