下列程序的执行结果是______。 include float temp; floatfn2(float r) { temp= 下列程序的执行结果是______。include<iostream.h>float temp;floatfn2(float r){temp=r*r*3.14;return temp;}void main( ){float a=fn2(5.0);floatb=fn2(5.0);b=20;cout<<temp<<endl;}
下列程序的执行结果是______。 include float temp; float&fn2(float r) { temp=
下列程序的执行结果是______。
include<iostream.h>
float temp;
float&fn2(float r)
{
temp=r*r*3.14;
return temp;
}
void main( )
{
float a=fn2(5.0);
float&b=fn2(5.0);
b=20;
cout<<temp<<endl;
}
相关考题:
下面程序的运行结果为 include void swap(int a, int b) { int temp; temp=a 下面程序的运行结果为#include<iostream.h>void swap(int a, int b){int temp;temp=a++;a=b;b=temp;}void main( )int a=2,b=3;swap(a, b) ;cout < < a < <"," < < b < < endl;}A.2,3B.3,2C.2,2D.3,3
以下程序执行后输出的结果是【】。 include include using namespace std; int 以下程序执行后输出的结果是【 】。include<iostream>include<fstream>using namespace std;int main(){ofstream ofile("D:\\temp.txt");if(!ofile){cout<<"temp.txt cannot open"<<endl;return 0;}ofile<<"This is a book" <<" " <<54321<<endl;ofile.close();ifstream ifile("D:\\temp.txt");if(!ifile){cout<<"temp.txt cannot open" <<endl;return 0;}charstr[40];ifile >> str;ifile.close();cout<<Str<<endl;return 1;}
下面程序的运行结果为()。includevoid swap(int a,int B) {int temp;temp=a++; 下面程序的运行结果为( )。 #include<iostream.h> void swap(int a,int B) { int temp; temp=a++; a=b; b=temp; } void main() { int a=2,b=3; swap(a,b); cout<<a<<“,”<<b<<end1; }A.2,3B.3,2C.2,2D.3,3
下列程序的招待结果是【 】。 include float temp;float fn2(float r){ temp=r* 下列程序的招待结果是【 】。include <iostream. h>float temp;float fn2(float r){temp=r* r* 3.14;return temp;}void main( ){float a=fn2(5.0);float b=fn2(5.0)b=20;cout<<temp<<end1;}
有如下的程序: include include using namespace std; int main() { ofstr 有如下的程序:include <iostream>include <fstream>using namespace std;int main(){ofstream outf("D:\\temp.txt",ios_base::trunc) ;outf<<"World Wide Web";outf.close();ifstream inf("D:\\temp.txt");char s[20];inf>>s;inf.close();cout<<s;return 0;}执行后的输出结果是【 】。
下面程序输出的结果为()。includevoid fun(int a,int b){int temp;temp=a;a=b;b=tem 下面程序输出的结果为( )。 #include<iostream.h> void fun(int a,int b) { int temp; temp=a; a=b; b=temp; } void main() { int m,n; m=1; n=2; fun(m,n); cout<<m<<""<<n<<end1; }A.12B.21C.22D.程序有错误
下面程序的结果为( )。 #include"iostream.h" void change(int a,int b) { int temp; temp=a; a=b b=temp; } void main() { int m,n; m=8; n=9; change(m,n); cout<<m<<" "<<n<<endl; }A.89B.98C.程序有错误D.99
下面程序的运行结果为()。includevoid swap (int a, int b){int temp;temp=a++ 下面程序的运行结果为( )。#include<iostream.h>void swap (int a, int b){int temp;temp=a++;a=b;b=temp;}void main(){int a=2, b=3;swap(a,b);cout<<a<<","<<b<<end1;}A.2,3B.3,2C.2,2D.3,3
15、以下程序执行的结果是: my_dict={'bill':1,'rich':2,'fred':10,'walter':20} temp = 0 for value in my_dict.values(): temp = temp + value print (temp)