c程序设计第四版谭浩强
编写一个c程序 输入a b c三个值,输入其中最大者。
【c源程序答案】
#include <stdio.h>
int main()
{int a,b,c,max;
printf("please input a,b,c:\n");
scanf("%d,%d,%d",&a,&b,&c);
max=a;
if (max<b)
max=b;
if (max<c)
max=c;
printf("The largest number is %d\n",max);
return 0;
}
本文链接:http://www.wb98.com/c/post/tanhaoqiang_1.6.html
本站文章搜索: