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

怎样编写一个比较三个数大小的c程序,各位大哥请多多请教
慕慕6466544
浏览 1008回答 1
1回答

田心枫

# 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); }
打开App,查看更多内容
随时随地看视频慕课网APP