Скачиваний:
158
Добавлен:
16.04.2013
Размер:
732 б
Скачать
#include "stdio.h"
#include "conio.h"
#include "stdlib.h"
#include "process.h"
#include "dos.h"
#include "graphics.h"
#include "iostream.h"
#include "io.h"
void main()
{char sm[20];
int midx, midy;
textmode(BW80);
int mode=DETECT, driver=EGA;
initgraph(&driver, &mode, "c:\\BORLANDC\\bgi");
int errorcode = graphresult();
if (errorcode != grOk)
{
   printf("Graphics error: %s\n", grapherrormsg(errorcode));
   printf("Press any key to halt:");
   getch();
   exit(1);
};
midx = getmaxx() / 2;
midy = getmaxy() / 2;
cout << "Input Name Surname: " << endl;
scanf("%s", sm);
setcolor(4);
setbkcolor(1); 
settextjustify(CENTER_TEXT, CENTER_TEXT);
outtextxy(midx, midy, sm );
getch();
closegraph();

}
Соседние файлы в папке lab4