用以下程序能否输出三者中较大的数
#include<stdio.h>intmain(){inta,b,c;scanf("%d,%d,%d",&a,&b,&c);if(a>b)if(a>c)printf("...
#include<stdio.h>
int main()
{
int a,b,c;
scanf("%d,%d,%d",&a,&b,&c);
if(a>b)
if(a>c)printf("max=%d\n",a);
else
printf("max=%d\n",c);
else if(b<c)printf("max=%d\n",c);
else printf("max=%d\n",b);
return 0;
} 展开
int main()
{
int a,b,c;
scanf("%d,%d,%d",&a,&b,&c);
if(a>b)
if(a>c)printf("max=%d\n",a);
else
printf("max=%d\n",c);
else if(b<c)printf("max=%d\n",c);
else printf("max=%d\n",b);
return 0;
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询