网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
下列程序运行后的输出结果是______。Private Sub f(k,s) s = 1 for j = 1 To k s=s*j Next jEnd SubPrivate Sub Command1_ Click () Sum = 0 for i = 1 To 3 Call f(i, s) Sum = Sum + s Next i Print Sum End Sub
A.0
B.3
C.6
D.9
参考答案
更多 “ 下列程序运行后的输出结果是______。Private Sub f(k,s) s = 1 for j = 1 To k s=s*j Next jEnd SubPrivate Sub Command1_ Click () Sum = 0 for i = 1 To 3 Call f(i, s) Sum = Sum + s Next i Print Sum End SubA.0B.3C.6D.9 ” 相关考题
考题
以下程序运行后的输出结果是【】。includemain(){int k=1,s=0; do{ if((k%2)!=0)continue;
以下程序运行后的输出结果是【 】。include<stdio.h>main(){ int k=1,s=0;do{if((k%2)!=0) continue;s+=k; k++;}while(k>10);printf("s+%d\n",s);}
考题
以下程序的输出结果是【 】。include defineN 5 int fun(int *s,int a,int n) {int j; *s=
以下程序的输出结果是【 】。include <stdio.h>define N 5int fun(int *s,int a,int n){ int j;*s=a j=n;while(a!=s[j]) j-;return j;main(){ int s[N+1]; int k:for(k=1 ;k<=N;k++) s[k]=k+1:print f("%d\n",fun(s,4,N));}
考题
有以下程序: #includestdio.h void fun(int*s) { static int i=0; do{s[J]=s[J]+s[j+I];}while(++j2); } main( ) { int k.a[l0]={1,2,3,4,5}; for(k=1;k3;k++)fun(a); for(k=0;k5;k++)pfintf("%d",a[k]); printf("\n"); } 程序运行后的输出结果是( )。A.12345B.23445C.34756D.35745
考题
有以下程序:includevoid f(char *s, char *t){ char k;k=*s;*s=*t; *t=k;s++;t- -;
有以下程序:#include <string .h>void f(char *s, char *t){ char k; k=*s; *s=*t; *t=k; s++; t- -; if(*s) f(s, t);}main(){ char str[10]="abcdefg",*p; p=str+strlen(str)/2+ 1; f(p,p-2); printf("%s\n", str);}程序运行后的输出结果是( )。A.abcdcfgB.gfedcbaC.gbcdefaD.abedcfg
考题
有以下程序:includevoid f(char*s,char*t){ char k;k=*s;*s=*t;*t=k;s++;t--;if(*s)f
有以下程序: #include<string.h> void f(char*s,char*t) { char k; k=*s; *s=*t; *t=k; s++; t--; if(*s) f(s,t); } main( ) {char str[10]="abcdefg",*p; p=str+strlen(str)/2+1; f(p,p-2); printf(~%s\n",str); } 程序运行后的输出结果是 ______。A.abcdefB.gfedcbaC.gbcdefaD.abedcfg
考题
下面程序的输出结果是( )。include using namespace std;void main(){int s;for(int k
下面程序的输出结果是( )。#include <iostream>using namespace std;void main(){int s;for(int k=2;k<6;k+=2)s=1;for(int j=k; j<6;j++) s+=j;cout<<s<<end1;A.9B.1C.11D.10
考题
有以下程序#includestdio.hvoid fun(int *s){ static int j=0;do { s[j]=s[j]+s[j+1]; )while(++j2);}main( ){ int k,a[10]={1,2,3,4,5);for(k=1;k3;k++)fun(a);for(k=0;k5;k++)printf(”%d”,a[k]);printf("\n");}程序运行后的输出结果是A) 12345B)23445C)34756D) 35745
考题
下面程序的输出结果是()includeusing namespace std;int main(){int s:for(int k=2;k
下面程序的输出结果是( ) #include<iostream> using namespace std; int main() { int s: for(int k=2;k<6;k+=2){ s=1; for(int j=k, j<6;j++)s+=j; } cout<<s<<end1: }A.9B.1C.11D.10
考题
下列程序运行后的输出结果是( )。 public class Sun { public static void main(String args[]) { int i,j,s; s=0; for(i=1;i<=3;i++) for(j=0;j<=i-1;j++) s=s+1; System.out.println(s); } }A.6B.5C.4D.3
考题
9、计算运行下列程序段后s的值: After running the following program segment, the value of s is: n=10; s=0; for(k = 1; k < n - 1; k++) for(j = n; j >= k; j--) s = s + 1;
热门标签
最新试卷