当输入10,11,12时,下面程序运行结果是 【6】 。#include <iostream>using namespace std;int main(){ int a,b,C,max; Cin>>a>>b>>c; max=a; if(max<b) max=b; if(max<c) max=c; cout<<max<<end1; return 0;
参考答案:L
解析: 此题考查if语句的基本使用。程序的功能是输入3个整数,利用if语句,找出其中最大的一个整数并输出。
当输入10,11,12时,下面程序运行结果是 【6】 。#include <iostream>using namespace std;int main(){ int a,b,C,max; Cin>>a>>b>>c; max=a; if(max<b) max=b; if(max<c) max=c; cout<<max<<end1; return 0;
参考答案:L
解析: 此题考查if语句的基本使用。程序的功能是输入3个整数,利用if语句,找出其中最大的一个整数并输出。