void copy()
{
int x,y;
FILE*f;
f = fopen("save.txt","w+");
for (x=0;x<getmaxx();x++)
for (y=0;y<getmaxy()-50;y++)
{
fprintf(f,"%d",getpixel(x,y));
fprintf(f,"\n");
}
}
void paste()
{
int x,y,color;
FILE *f;
f=fopen("save.txt","r");
for (x=0;x<getmaxx();x++)
for (y=0;y<getmaxy()-50;y++)
{
fscanf(f,"%d",&color);
putpixel(x,y,color);
}
getch();
cleardevice();
}