navylieutanent
navylieutanent
关注数: 0
粉丝数: 4
发帖数: 9
关注贴吧数: 2
去哪儿师傅 去哪儿师傅
求三个数最大值的程序 不知道这个程序哪里写错了 求指教 #include <stdio.h> int main() { int max(int x,int y); printf("please input three numbers:\n"); int a,b,c,d; scanf("%d,%d,%d",&a,&b,&c); d=max(a,b); if(d>c) printf("the largest number is:\n",d); else printf("the largest number is:\n",c); return 0; } int max(int x,int y) { int z; if(x>y) z=x; else z=y; return (z); }
1
下一页