请写出下面程序的输出结果。def fun(s,n):If n==1:return Is[0];t=fun(s,n-1)if t<ls[n-1]:retu
请写出下面程序的输出结果。
def fun(s,n):
If n==1:
return Is[0];
t=fun(s,n-1)
if t<ls[n-1]:
return t
else:
return Is[n-1]
print(fun([35,27,29,50-1],5)
print(fun([35,27,29,50-1],3))
请写出下面程序的输出结果。
def fun(s,n):
If n==1:
return Is[0];
t=fun(s,n-1)
if t<ls[n-1]:
return t
else:
return Is[n-1]
print(fun([35,27,29,50-1],5)
print(fun([35,27,29,50-1],3))
阅读以下程序,填写运行结果()。def fun(a,b,*c): lst=[] for i in c: lst.append(a*b*i) return lst print(fun(2,3,4,5,6)[1])
阅读下面程序,写出输出结果。
#include using namespace std ; class A { int a, b; public : A() { a = b = 0; }
A(int aa, int bb) { a = aa; b = bb; cout << a << ' ' << b << endl ; } }; int main() { A x, y(2,3);
return 0; }
写出以下程序的运行结果。
#include int fun(int a){int b=0;static int c=3;b ; c ;return(a b c);}
main(){int i, a=5;for (i=0; i<3; i )cout<< i<< " "<< fun(a)<< " ";}
A.114,124
B.109,116
C.113,124
D.110,116
阅读下面程序段,则执行后输出的结果是()。 include“stdio.h” void main() { char fun(char,int); char a;‘A’; int b=13; a=fun(a,b); putchar(a); ) char fun(char a,int b) { char k; k=a+b; return k; )
A.A
B.M
C.N
D.L
下面程序执行后输出的结果是【 】。 int m=13; int fun(int x,int y) { int m=3; return(x*y-m); } main() { int a=7,b=5; Printf(“%d\n",fun(a,b)/m); }
阅读下面程序,则程序的执行结果为【 】。 include"stdio.h" fun(int k,int*p) { int a,b; if(k==1‖k==2) *p=1; else{ fun(k-1,&a); fun(k-2,&b); *p=a+b; } } main() { int x; fun(6,&x); printf("%d\n",x);}
阅读下面程序,则程序的执行结果为【 】。 include"stdio.h" main() { int a=30,b=20,z; z=fun(a+b,a-b); printf("%d\n",z);} fun(int a,int b) { int z; z=a/b; return z;}