子函数及演示程序:
#include
#include
#include
void goto_xy(int x,int y);
void dcls(int x1,int x2,int y1,int y2);
void bcls(int x1,int x2,int y1,int y2);
void kcls(int x1,int x2,int y1,int y2);
void recls(int x1,int x2,int y1,int y2);
void zcls(int x1,int x2,int y1,int y2);
void puta(void);
/*--------------演示程序---------------------*/
main()
{
puta();
getch();
dcls(0,4,0,79);
getch();
puta();
getch();
bcls(0,25,0,79);
getch();
puta();
getch();
zcls(0,25,0,79);
getch();
}
/*********center clear screen(中心清屏)***********/
void zcls(int x1,int x2,int y1,int y2)
{
int x00,y00,x0,y0,i,d;
if((y2-y1)>(x2-x1)){
d=(x2-x1)/2;
x0=(x1+x2)/2;