while(scanf!=EOF)

#include<stdio.h>
int main(void)
{
char t,a,b,c;
while(scanf("%c%c%c",&a,&b,&c)!=EOF)
if(a>b)
{

t=a;
a=b;
b=t;
}
if(a>c)
{
t=a;
a=c;
c=t;
}
if(b>c)
{
t=b;
b=c;
c=t;
}
printf("%c %c %c\n",a,b,c);
return 0;
}错在哪里

Returns the number of fields successfully converted and assigned; the return value does not include fields that were read but not assigned. A return value of 0 indicates that no fields were assigned.If format is a NULL pointer, the invalid parameter handler is invoked, as described in Parameter Validation. If execution is allowed to continue, these functions return EOF and set errno to EINVAL. 返回数字领域的成功转换和分配,返回值不包括那些读取但不能分配领域。甲返回值为0表示没有被分配领域。
如果格式是一个NULL指针,无效的参数处理函数,如参数验证描述。如果执行的是继续下去,这些函数返回EOF,并设置errno成EINVAL。
温馨提示:答案为网友推荐,仅供参考
第1个回答  2013-09-14
现在是什么问题?把if语句和打印printf语句一起括起来!不然,在输入不出问题的情况下,会死循环,而且不会排序。while的作用范围只有第一个if
第2个回答  推荐于2018-03-29
#include<stdio.h>
int main(void)
{
char t,a,b,c;
while(scanf("%c%c%c",&a,&b,&c)!=EOF) {
if(a>b)
{

t=a;
a=b;
b=t;
}
if(a>c)
{
t=a;
a=c;
c=t;
}
if(b>c)
{
t=b;
b=c;
c=t;
}
printf("%c %c %c\n",a,b,c);
getchar();
}
return 0;
}本回答被网友采纳
第3个回答  2013-09-14
eof是文件的。

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网