#include "stdio.h" int main() { int x,y,z; x=1; y=2; z=3; if(x>y)//1>2不成立,直接输出z { if(x>z) printf("%d",x); else printf("%d",y); } printf("%d\n",z);// getch(); }
#include<stdio.h> int main(int argc, char* argv[]) { int x=1,y=2,z=3; printf("%d\n",x>y? (x>z?x:z) : (y>z?y:z) ); return 0; }