更多"已知程序的结果为1 2 3,请填空。 #include<iost"的相关试题:
[填空题]已知程序的结果为123,请填空。
#include<iostream.h>
template<classT>
classA
{
public:
Tx,y,z;
voiddisplay( ){cout<<x<<""<<y<<""<<z;= =;
voidmain( )
{
A<int>al;
【 】
【 】
【 】
al.display( );
=
[填空题]已知程序的结果为123,请填空。
#include<iostream.h>
template<classT>
classA
public:
Tx,y,z;
voiddisplay( )cout<<x<<""<<y<<""<<z;
;
voidmain( )
A<int>al;
【12】
【13】
【14】
al.display( );
[填空题]已知程序的结果为1 2 3,请填空。
#include<iostream.h>
template<class T>
class A
public:
T X, y, z;
void display( ) cout < < x < < " " < < y < < " " < < z;
;
void main( )
A<int>a1;
12
13
14
a1.display( ) ;
[填空题]已知程序的结果为1 2 3,请填空。
#include<iostream.h>
template<class T>
class A
{
public:
T x,y,Z;
void display( ) {cout << x << " " << y << " " << z;}
};
void main( )
{
A<int>a1;
【12】
【13】
【14】
a1.display( );
}
[填空题]下列程序的招待结果是 【14】 。
# 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;
[填空题]下面程序对已知数组b,删除数组中某指定值的元素,但程序不完整,请填空。
Private Sub Command1_Click( )
Dim m, n%, i%, j%
m=Array(1,3,5,29,34,50)
n=Val(InputBox("请输入要删除的值"))
For i=0 To UBound(m)
If (12) Then
For j=i+1 To UBound(m)
(13)
Next j
ReDim Preserve (14)
MsgBox("删除完成")
Exit For
End If
Next i
End Sub
[填空题]下面程序的功能是:计算1~20之间的奇数之和与偶数之和,请填空使程序功能完整。
#include<stdio.h>
main( )
int a=0,b=0,c=0,i;
for(i=0;i<=20;i+=2)
a+=i;
______;
c+=b;
printf("偶数之和=%d/n",a);
printf("奇数之和=%d/n",c-21);