为什么这个代码的输出结果是5 0 3,而不是5 3 4,结果5 0 3又是怎样计算出来的呢

为什么这个代码的输出结果是5 0 3,而不是5 3 4,结果5 0 3又是怎样计算出来的呢

#include
int main()
{
 int a=4,b=3,c=5,t=0;
    if (aif (aprintf("%d %d %d\n",a,b,c);
    return 0;

}

重新格式化一下,就能看明白了。
满足if时,只运行一条,其他两句在if外面呢。


#include<stdio.h>
int main()
{
    int a=4,b=3,c=5,t=0;
    if (a<b)
        t=a;
    a=b;
    b=t;
    if (a<c)
        t=a;
    a=c;
    c=t;
    printf("%d %d %d\n",a,b,c);
    return 0;

}