Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <conio2.h>
- #include <stdlib.h>
- #include <windows.h>
- void QuadroDup(int CI, int LI, int CF, int LF, int CorT, int corF)
- {
- int i;
- textcolor(CorT); textbackground(corF);
- gotoxy(CI, LI);
- printf("%c", 201);
- gotoxy(CI, LF);
- printf("%c", 200);
- gotoxy(CF, LI);
- printf("%c", 187);
- gotoxy(CF, LF);
- printf("%c", 188);
- for(i = CI+1; i < CF; i++)
- {
- gotoxy(i, LI);
- printf("%c", 205);
- }
- for(i = LI + 1; i < LF; i++)
- {
- gotoxy(CI, i);
- printf("%c", 186);
- gotoxy(CF, i);
- printf("%c", 186);
- }
- for(i = CI + 1; i < CF; i++)
- {
- gotoxy(i, LF);
- printf("%c", 205);
- }
- }
- void ASCII(void)
- {
- int i = 0, col = 2, lin = 2, cor = 1;
- clrscr();
- /*
- for(coluna = 1; coluna <= 80; coluna+=7)
- {
- for(linha = 1; linha <= 25 && i < 256; linha++)
- {
- gotoxy(coluna, linha);
- printf("%d - %c", i, i++);
- }
- }
- */
- for(i = 0; i < 256; i++)
- {
- textcolor(cor);
- cor++;
- gotoxy(col, lin);
- printf("%d - %c", i, i);
- if(cor == 15)
- cor = 1;
- if(lin == 24)
- {
- lin = 2;
- col += 8;
- }
- else
- lin++;
- }
- QuadroDup(5,3, 75,23, 1, 2);
- getch();
- }
- int main(void)
- {
- QuadroDup(5,3, 75,23, 1, 2);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement