阅读下面的程序:includevoid main(){int x;cin>>x;if(x++>5)cout 阅读下面的程序: #include<iostream.h> void main() { int x; cin>>x; if(x++>5) cout<<x<<end1; else cout<<x--<<end1; } 如果两次执行上述程序,且键盘输入分别为4和6,则输出结果分别是( )。A.4,6B.3,6C.4,7D.5,7

阅读下面的程序:includevoid main(){int x;cin>>x;if(x++>5)cout<

阅读下面的程序: #include<iostream.h> void main() { int x; cin>>x; if(x++>5) cout<<x<<end1; else cout<<x--<<end1; } 如果两次执行上述程序,且键盘输入分别为4和6,则输出结果分别是( )。

A.4,6

B.3,6

C.4,7

D.5,7


相关考题:

阅读下面程序: include void fun(int n) { int x(5); static int y(10); if(n>0) { 阅读下面程序:include<iostream.h>void fun(int n){int x(5);static int y(10);if(n>0){++x;++y;cout<<x<<","<<y<<end1;}}void main(){int m(1);fun(m);}则该程序的输出结果是______。

下面程序的运行结果是includevoid fun(int * a,int * b){ int x= * a; * a = * b;* 下面程序的运行结果是 #include<iostream.h> void fun(int * a,int * b) { int x= * a; * a = * b; * b=x; cout <<*a<< *b<<""; } void main( 0 { int x =1,y =2; fun(x,y); cout<< x << y <<end1; }A.12 12B.12 21C.21 12D.21 21

有如下程序:includevoid main(){int x=2,y=3,a,b,c,d;a=(x++>=--y);b=(x==++y);c=(x 有如下程序:include<iostream.h>void main(){int x=2,y=3,a,b,c,d;a=(x++>=--y);b=(x==++y);c=(x--!=y);d=(++x>y--);Cout<<a<<b<<c<<d<<end1;}则程序执行后变量a,b,c,d的值分别是【 】。

阅读下面程序:include int fun( int a, int b ){int c;c=a*b;return c;}void main() 阅读下面程序:include <iostream.h>int fun( int a, int b ){int c;c=a*b;return c;}void main(){int a=3,b=5,c=4,x=0;x=fun(fun(a, b),c);cout<<x<<end1;}其运行结果是【 】。

执行下列语句:includeusing namespace std;int main(){int x=3;if(x=5)cout 执行下列语句: #include<iostream> using namespace std; int main() { int x=3; if(x=5) cout<<x++<<end1; else cout<<x<<end1; return 0; } 程序的输出是( )。A.3B.4C.5D.6

若运行时给变量x输入12,则以下程序的运行结果是 include void main( ) { int 若运行时给变量x输入12,则以下程序的运行结果是 #include<iostream.h> void main( ) { int x,y; cin > > x; y=x > 12? x+lO:x-12; cout < < y; cout < < end1; }A.0B.22C.12D.10

阅读下面的程序:includevoid main(){ int x; cin>>x; if(x++>5) cout 阅读下面的程序: #include<iostream.h> void main() { int x; cin>>x; if(x++>5) cout<<x<<endl; else cout<<x——<<endl; } 如果两次执行上述程序,且键盘输入分别为4和6,则输出结果分别是( )。A.4,6B.3,6C.4,7D.5,7

下列程序段的输出结果是 include void fun(int * X,int * y) {cout 下列程序段的输出结果是 #include<iostream.h> void fun(int * X,int * y) { cout < < * X < < * y; * X=3; * y=4; } void main( ) { int x=1,y=2; fun(y,x); cout < < X < < y < < end1; }A.2143B.1212C.1234D.2112

下面程序的输出结果是()。includevoid main(){int x=-1,y=5,z;z=(x++ 下面程序的输出结果是( )。#include<iostream.h>void main(){int x=-1,y=5,z;z=(x++<0) (y-->=0);cout<<x<<'\t'<<y<<'\t'<<z<<end1;}A.-1 5 0B.-1 4 1C.0 4 1D.0 4 0