• 2021-04-14
    以下程序执行结果()。………cout.fill(‘’)cout.width(10)cout
  • ***188.666

    内容

    • 0

      以下if语句语法正确的是( )。 A: if(x>0) cout<<xelse cout<<--x; B: if(x>0){ x=x+y; cout<<x; }else cout<<--x; C: if(x>0){ x=x+y; cout<<x; };else cout<<--x; D: if(x>0){ x=x+y; cout<<x };else cout<<--x;

    • 1

      写出下列程序的执行结果是:__________________。 #includeusing namespace std; void main() { int i = 1; while( i<;=10 ) if( ++i % 3 != 1 ) continue; else { cout <;<; i; if(i!=10) cout<;<;","; } }

    • 2

      阅读下面的程序, 请写出程序的输出结果 。 #include<iostream> using namespace std; int main () { enum Color {Red,Green,Blue}; Color color; color=Red; cout<<color<<","; color=Green; cout<<color<<","; color=Blue; cout<<color<<","; cout<<Red+Green+Blue<<endl; return 0; }

    • 3

      以下程序段中,语句cout< for(m=20;m>0;m--) {if(m%6==0) break; cout< }

    • 4

      已知数组arr的定义如下<br/>int arr&#91;5&#93;={1,2,3,4,5};<br/>下列语句中输出结果不是2的是 A: cout B: cout C: cout D: cout