# 熟悉题型——填空题（删除线性表节点）

#include<iostream>
using namespace std;
{
int num;
};
{
t->num=l;//每个节点编号
if(n==1)
{
t->next=NULL;
return t;
}
cin>>l;
t->next=creat(l,n-1);
return t;
}
{
if(p==NULL)
return ;
cout<<p->num;
if(n!=1)
cout<<" ";
printf(p->next,n--);
}
{
while(num!=p1->num&&p1->next!=NULL)
{
p2=p1;
p1=p1->next;
}
/************
请补充缺少的代码，使该程序完成功能。
***************/
}
int main()
{
int n,l,m;
cin>>n;
cin>>l;
cin>>m;
return 0;
}

``````10
1 2 3 4 5 6 7 8 9 10
8
``````

``1 2 3 4 5 6 7 9 10 ``

``````#include<iostream>
#include<cmath>
using namespace std;
class Point
{
private:
int x1,y1,x2,y2,h;
public:
Point(int X1,int Y1,int X2,int Y2,int H):x1(X1),y1(Y1),x2(X2),y2(Y2),h(H){}
int Width(){return fabs(y1-y2);}
int Long(){return fabs(x1-x2);}
int get_h(){return h;}

};
class underside: public Point//底面积类
{
public:
underside(int X1,int Y1,int X2,int Y2,int H):Point(X1,Y1,X2, Y2, H){}
int area(){return Long()*Width();}
};
class flank:public Point//侧面积类
{
public:
flank(int X1,int Y1,int X2,int Y2,int H):Point(X1,Y1,X2, Y2, H){}
int area()
{return Width()*get_h();}
};
class super_area :public underside,public flank//表面积类
{
public:
super_area(int X1,int Y1,int X2,int Y2,int H):flank( X1,Y1,X2,Y2,H),underside(X1,Y1,X2,Y2,H){}
int area();
};
int super_area::area()
{
int s;
s=flank::area()*4+underside::area()*2;
cout<<"表面积为"<<s<<endl;
return 0;
}
int main()
{
super_area a(1,1,2,2,3);
a.area();
return 0;
}
``````

``````#include<iostream>
using namespace std;
class Person
{
private:
string name;
string tel;
public:
void getvalue()
{
}
void display()
{
cout<<"name:"<<name<<endl;
cout<<"tel:"<<tel<<endl;
}

};
//改错处→↓
/*--------------------------------------*/
class Student:public Person
{
private:
string ID;
public:
void getvalue1()
{
cin>>ID;
}
void display1()
{
cout<<"ID:"<<ID<<endl;
}

};
/*---------------------------------------*/
int main()
{
Student stu;
stu.getvalue();
stu.getvalue1();
stu.display();
stu.display1();
return 0;
}
``````