单选题阅读下列程序 FUN(c,d)=a*c+b/d DATA a,b/1.0,1.0/ WRITE(*,’(F4.1)’) FUN(a,b)-FUN(b,a) END 程序运行结果是()A 0.0B 4.0C 2.OD 3.O
单选题
阅读下列程序 FUN(c,d)=a*c+b/d DATA a,b/1.0,1.0/ WRITE(*,’(F4.1)’) FUN(a,b)-FUN(b,a) END 程序运行结果是()
A
0.0
B
4.0
C
2.O
D
3.O
参考解析
解析:
暂无解析
相关考题:
阅读下面程序: 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);}则该程序的输出结果是______。
下列程序的输出结果是()。includeusing namespace std;templateT fun(T a 下列程序的输出结果是( )。 #include<iostream> using namespace std; template<typename T> T fun(T a,T b){return(a>=b)?a:b;} void main() { cout<<fun(3,6)<<','<<fun(3.14F,6.28F)<<end1; }A.6,3.14B.3,6.28C.3,3.14D.6,6.28
下列程序运行后的输出结果是 Function Fun(n) x=n*n Fun=x一11 End Function Private Sub Command1_Click() For k=1 To 2 Y=Fun(k):Print Y Next End SubA. -10 -7B.10 8C.1 3D.0 4
下面程序的输出结果为:Base:: fun,请将程序补充完整。include class Base{public: 【】 下面程序的输出结果为:Base:: fun,请将程序补充完整。include <iostream.h>class Base{public:【 】 fun(){cout<<"Base::fun"<<end1:}class Derived : public Base{public:【 】 fun(){ cout<<"Derived::fun"<<end1; }};int main(){Base a,*pb;Derived b;pb = b;pb->fun();return 0;}
阅读下面程序: include int fun2(int m) { if(m%3==0) return 1; else return 0; } 阅读下面程序:include <iostream.h>int fun2(int m){if(m%3==0)return 1;elsereturn 0;}void fun1(int m, int s){int i;for (i=1; i<m; i++)if(fun2(i))S=S*i;}void main(){int n=9, s=2;fun1(n, s);cout<<s<<end1;}该程序的运行结果是【 】。
以下程序的运行结果是______。includemain(){ int fun();fun();}fun(){static int a[3]= 以下程序的运行结果是______。include<stdio.h>main(){ int fun();fun();}fun(){static int a[3]={0,1,2};int i;for(i=0;i<3;i++)a[i]+=a[i];for(i=0;i<3;i++)printf("%d,",a[i]);pfintf("\n",);}
阅读下面程序: include using namespace std; int fun(int a,int b) {int c;c = a * 阅读下面程序:include <iostream>using namespace std;int fun( int a, int b){int c;c = a * b;return c;}int main ( ){int a = 3, b = 5, c = 4, x = O;x = fun( fun( a, b ), c );cout<<x<<end1;return 0;}其运行结果是【 】。
阅读下面程序: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;inta;int fun();int main(){ externinta; in 有以下程序: #include <iostream> using namespace Std; int a; int fun(); int main() { extern int a; int b; a = 100; b = fun(); cout<<b<<end1; return 0; } int fun() { extern int a; return (10*A); } 其程序运行后的输出结果是( )。A.100B.10C.1000D.10000
下列程序中横线处正确的语句是()。includeusing namespace std;class TestClass{publi 下列程序中横线处正确的语句是( )。 #include<iostream> using namespace std; class TestClass { public: void fun(){cout<<"TestClass::fun"<<end1;} }; class TestClass1:public TestClass { void fun() { ______//显示调用基类的函数 fun() cout<<"TestClass1::fun"<<end1; } };A.fun();B.TestClass.fun()C.TestClass::fun();D.TestClass->fun();
下列程序的输出结果是()。includeusing namespace std;templateT fun(T a,T b){return 下列程序的输出结果是( )。 #include<iostream> using namespace std; template T fun(T a,T b){return(a>=b)?a:b;} void main() { cout<<fun(3,6)<<','<<fun(3.14F,6.28F)<<end1; }A.6 ,3.14B.3,6.28C.3,3.14D.6,6.28
以下程序的正确运行结果是()。includeint fun(int);void main(){int a=2,i;for(i=0; 以下程序的正确运行结果是( )。 #include<iostream.h> int fun(int); void main() { int a=2,i; for(i=0;i<3;i++) cout<<fun(a)<<end1; cout<<end1; } int fun(int a) { int b=0; static int c=3; b++;c++; return(a+b+c); }A.4,5,6B.6,7,9C.7,8,9D.7,7,7
下列程序的运行结果是()。includevoid fun(int *a, int *b) {int *k; k=a; a=b; b= 下列程序的运行结果是( )。#include<iostream.h>void fun(int *a, int *b) {int *k; k=a; a=b; b=k;}void main(){int a=2OO4,b=9,*x=a,*y=b;fun(x, y);cout<<a<<" "<<b<<end1;}A.20049B.92004C.0D.编译时出错
下面程序的运行结果是( )。include main(){int a=25; fun(A); }fun(int *x){ print 下面程序的运行结果是( )。include<stdio.h>main(){int a=25;fun(A);}fun(int *x){ printf("%d\n",++*x);}
下列程序输出结果是【】。 include using namespace std; template T fun( 下列程序输出结果是【 】。include <iostream>using namespace std;template <typename T>T fun(T a, T b) {return (a<=b)?a:b;}int main(){cout<<fun(3,6)<<','<<fim(3.14F, 6.28F)<<end 1;return 0;}
下列程序的输出结果是【】。 include void fun(int x) { if(x/2>0) fun(x/2); printf("%d" 下列程序的输出结果是【 】。include <stdio.h>void fun(int x){if(x/2>0) fun(x/2);printf("%d",x);}main(){fun(3);printf("\n");}
阅读下列程序。 Private Sub Command1_Click() Dim i As Integer,k As Integer k=2 For i=1 To 3 Print Fun(k); Next End Sub Function Fun(j As Integer) Static b a=0 a=a + 1 b=b + 1 Fun=a*b+j End Function 程序运行后,单击命令按钮输出结果是A.234B.345C.567D.356
下列程序的运行结果是 inClude roid fun(int *a,int * b) { int * k; k=a;a=b 下列程序的运行结果是 #inClude<iostream.h> roid fun(int *a,int * b) { int * k; k=a;a=b;b=k;} void main( ) { int a=2004,b=9,* x=a,* y=b; fun(x,y); cout < < a < <" " < < b < < end1;}A.2004 9B.9 2004C.0 0D.编译时出错
下列程序中画线处应填入的语句是 class Base { public: void fun(){cout<<"Base of fun"<<end1:} }; class Derived:public Base { void fun() { _______//显示基类的成员函数fun cout<<"Derived of fun"<<end1; } };A.fun();B.Base.fun();C.Base∷fun();D.Base- >fun();
有以下程序include using namespace std;int a;int fun ();int main (){extern int a 有以下程序#include <iostream>using namespace std;int a;int fun ();int main (){ extern int a; int b; a = 100; b = fun(); cout<<b<<end1; return 0;}int fun{){ extern int a; return (10*a ;} 其程序运行后的输出结果是A.100B.10C.1000D.10000
下面程序的运行结果是【】。 include using namespace std; void fun(inta,int b=3) 下面程序的运行结果是【 】。include <iostream>using namespace std;void fun(int a, int b=3){static int i=2;a = a + b + i;i = i + a;}int main(){int x=5, y=2;fun(x, y);cout<<x<<",";fun(x);cout<<x<<end1;return 0;}
程序如下:Private Sub form_ Activate() Dim a As Integer for i=4 To 5 a=fun(i) Print a, Next iEnd SubPrivate Function fun(n)As Integer if n >0 then fun =n* fun(n-1) Else fun=1 End ifEnd Function 程序最后打印结果是______。A.4 5B.12 120C.24 120D.24 60
阅读下列程序: Private Sub Command1_Click() Dim i As Integer,k As Integer k=2 For i=1 To 3 Print Fun(k); Next End Sub Function Fun(j As Integer) Static b a=0 a=a+1 b=b+1 Fun=a*b+j End Function 程序运行后,单击命令按钮输出结果是A.234B.345C.567D.356
假定a=3,下列程序的运行结果是()。includeint fun(int n);void main(){cout 假定a=3,下列程序的运行结果是( )。 #include<iostream.h> int fun(int n); void main() { cout<<"Please input a number:"; int a,result=0; cin>>a; result=fun(a); cout<<result<<end1; } int fun(int n) { int p=1,result=0; for(int i=1;i<=n;i++) { p*=i; result +=p; } return result; }A.4B.8C.9D.20
下列程序运行后的输出结果是()。 include void fun(int,int,int*); void main() { i 下列程序运行后的输出结果是( )。 #include<iostream.h> void fun(int,int,int*); void main() { int x,y,z; fun(5,6,x); fun(7,x,y); fun(x,y,z); cout<<x<<","<<y<<","<<z<<end1; } void fun(int a,int b,int *c) { b+=a; *c=b-a; }A.5, 5, 5B.6, 6, 6C.5, 6, 7D.7, 7, 7
单选题以下程序:#include void fun(int x){ if(x/21) fun(x/2); printf(%d,x);}main(){ fun(7); printf();}程序运行后的结果是( )。A137B731C73D37
单选题阅读下列FORTRAN程序: INTRINSIC SIN, COS WRITE(*,*)FUN(SIN,30.0)/FUN(COS,30.0) END FUNCTION FUN(F,X) X=X*3.14159/180 FUN=F(X) END 程序运行结果是()A sin30°的值B cos30°的值C tg30°的值D ctg30°的值