填空题

以下程序的运行结果是______。 main() {int a=1,b=2,c; if(a>b)c=1; else if(a==b)c=0; else c=-1; printf("%d\n",c);}

【参考答案】

[解析] if~else语句的形式: if(表达式) 语句1 else if 语句2 else 语句3 它的......

(↓↓↓ 点击下方‘点击查看答案’看完整答案 ↓↓↓)