Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <conio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <ctype.h>
- #define SZ 20
- #define M 10
- char menu_pontok[5][15]={"Első pont","Második pont","Harmadik pont","Negyedik
- pont","V É G E"};
- char cim[]=" M E N Ü P O N T O K ";
- char ala[]="-----------------------";
- char val[]="Kérem válasszon: ";
- main()
- {
- char c;
- int xj,yj,xb,yb;
- int i;
- char valasz;
- struct text_info info;
- gettextinfo(&info);
- textbackground(BLACK);
- clrscr();
- xb=info.screenwidth/2-SZ;
- yb=info.screenheight/2-M;
- xj=xb+2*SZ;
- yj=yb+2*M;
- window(xb,yb,xj,yj);
- textbackground(YELLOW);
- textcolor(BLUE);
- clrscr();
- gotoxy(20-strlen(cim)/2,2);
- cprintf(cim);
- gotoxy(20-strlen(cim)/2,3);
- cputs(ala);
- for (i=0;i<5;i++)
- {
- gotoxy(12,2*i+6);
- cprintf("%2d. %s",i+1,menu_pontok[i]);
- }
- do
- {
- gotoxy(12,2*M-3);
- cprintf(val);
- valasz=getche();
- clreol();
- }
- while(!isdigit(valasz) || valasz>'5' || valasz<'1' );
- while ((c=getch()) !=13);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement