关于优先级
#include <stdio.h>
void main()
{
float a=2.8,b=1.0,c=4;
clrscr();
printf("%f\n",a>(b>c?b:c)?a:(b>c?b:c)); /*这句优先级我明白*/
printf("%f\n",a> b>c?b:c ?a: b>c?b:c ); /*但这句优先级我就不明白了,高手请指示*/
getch();
}
#include <stdio.h>
void main()
{
float a=2.8,b=1.0,c=4;
clrscr();
printf("%f\n",a>(b>c?b:c)?a:(b>c?b:c)); /*这句优先级我明白*/
printf("%f\n",a> b>c?b:c ?a: b>c?b:c ); /*但这句优先级我就不明白了,高手请指示*/
getch();
}