下列程序的运行结果是( )。 s=0:t=0:u=0 For x=1 To 3 For y=1 To x For z=y To 3 s=s+1 Next z t=t+1 Next y u=u+1 Next x Print s;t;uA.3 6 14B.14 6 3C.14 3 6D.16 4 3

下列程序的运行结果是( )。 s=0:t=0:u=0 For x=1 To 3 For y=1 To x For z=y To 3 s=s+1 Next z t=t+1 Next y u=u+1 Next x Print s;t;u

A.3 6 14

B.14 6 3

C.14 3 6

D.16 4 3


相关考题:

阅读下列程序,并给出运行结果SET,FALK OFFCLEARSTORE 0 T0 X,Y,S1,S2,S3D0 WHILE X1OX=X +lDO CASECASE INT(X/2)=X/2S1:SI+X/2CASE MOD(XJ 3)=0S2=S2+X/3CASE INT(X/2)X/2S3=S3+1ENDCASEENDDO?S1,S2,S3SET TALK 0NRETURN运行以上程序后,屏幕显示【 】。

下列程序的运行结果是【】。 include class Sample {int x,y;public:Sample() {x=y=0 下列程序的运行结果是【 】。include <iostream. h>class Sample {int x,y;public:Sample() {x=y=0; }Sample(int a, int b) {x=a;y=b;}void disp() {cout<<" x=" <<x<<" , y="<<y<<end1;}};void main() {Sample s1, s2(1, 2);s1. disp0;s2. disp ();}

下列程序的运行结果是()。includevoid sub(int*s,int*y){static int m=4;*y=s[0];m++;} 下列程序的运行结果是( )。 #include<stdio.h> void sub(int*s,int*y) {static int m=4; *y=s[0]; m++; } void main() {int a[]={1,2,3,4,5},k; int x; printf("\n"); for(k=0;k<=4;k++) {sub(a,x); printf("%d,",x); } }A.1,1,1,1,1,B.1,2,3,4,5,C.0,0,0,0,0,D.4,4,4,4,4,

下列程序的运行结果是()。includevoid sub(int*s,int*y){static int m=4:*y=s[m];m--;} 下列程序的运行结果是( )。 #include<stdio.h> void sub(int*s,int*y) {static int m=4: *y=s[m]; m--; } void main() {int a[]={1,2,3,4,5},k,x; printf("\n"); for(k=0;k<=4;k++) {sub(a,x); printf("%d,",x); } }A.5,4,3,2,1,B.1,2,3,4,5,C.0,0,0,0,0,D.4,4,4,4,4,

若有以下程序段;includeusing namespace std;int main(){ int a[]={1,4,5}; int *p=a[0],x=6,y,z; for(y=0;y<3;y++) z=((*(p+y)<x) ? *(p+y):x); cout<<z<<end1; return 0; } 程序运行后的输出结果是( )。A.1B.4C.5D.2

阅读以下函数说明和C语言函数,将应填入(n)处的字句写在对应栏内。【函数2.1】void sort(char *s,int num){int i,j--num;char t;while(j-->1)for(i=0;i<j;i++)if(s[i]>s[i+1]){t=s[i];s[i]=s[i+1];s[i+1]=t;}void main(){char *s="CEAedea";sort(s,5);printf("%s",s);}上述程序的结果是(1)【函数2.2】void main(){ union {int ig[6];Char s[12];} try;try. ig[0]=0x4542; try.ig[1]=0x2049;try. ig[2]=0x494a; try.ig[3]=0x474e;try. ig[4]=0x0a21; try.ig[5]=0x0000;pintf("%s",try, s);}上述程序的结果是(2)【函数2.3】void main(){ char *letter[5]= { "ab","efgh","ijk","nmop","st"};char **p;int i;p=letter;for(i=0;i<4;i++) .printf("%s",p[i]);}上述程序的结果是(3)【函数2.4】main(){int i=4,j=6,k=8,*p=I,*q=j,*r=k;int x,y,z;x=p==i;y=3*-*p/(*q)+7;z=*(r=k)=*p**q;printf("x=%d,y=%d,z=%d",x,y,z);}上述程序的结果是(4)【函数2.5】int a[]={5,4,3,2,1 };void main(){int i;int f=a[0];int x=2;for(i=0;i<5;i++)f+=f*x+a[i];printf("%d",f);}上述程序的结果是(5)

下面程序运行的结果是______。 main() { int x,y,z; x=0;y=z=-1; x+=-z---y; printf("x=%d\n",x); }A.x=4B.x=0C.x=2D.x=3

下面程序的输出结果是()。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

运行程序,程序输出结果是(). void sub (int *s, int *y ) { static int t=3 ; *y=s[t] ; t - -; } int main() { int a[ ]={1,2,3,4}, i , x=0; for (i = 0; i<4; i++) { sub (a,x ) ; cout<<x;} cout<<endl; return 0 ; }A.4321B.1234C.0000D.4444