-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtestconio.c
51 lines (38 loc) · 1.19 KB
/
testconio.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include <conio.h>
int main()
{
char input;
char *password;
int row, col;
while(!kbhit())
{
printf("Press any key!\n");
}
input=getche();
printf("You just pressed --> %c \n", input);
printf("Press any key to clear the screen\n");
getch();
clrscr();
printf("The screen successfully cleared\n");
password = getpass("Enter Password: ");
printf("The password is : %s\n",password);
printf("Getting location of cursor for this line !");
wherexy(&row, &col);
printf("\nYou were on Row: %d and Column: %d \n", row, col);
printf("Press any key to move to Row: 9 Column 4 and edit the line: ");
getch();
gotoxy(9, 4);
printf("You now see that it is edited .. Press any key to clear the screen and continue!");
getch();
clrscr();
printf("Now changing background color to green and text color to black \n");
textbackground(GREEN);
textcolor(BLACK);
printf("Some colorful text here \n");
printf("Press any key to delete last line (This line)");
getch();
delline();
printf("\nFinished ! Press any key to exit..");
getch();
return 0;
}