Tuesday, August 16, 2011

Delay in Password view

#include<stdio.h>
#include<conio.h>
#include<dos.h>
void main()
{
char ch;
clrscr();
printf("Enter the Password:\n");
ch=getch();
while(ch!=13)
{
if(ch==8)
{
printf("\b");
putch(NULL);
printf("\b");
}
else
{
printf("%c",ch);
delay(500);
putch('\b');
printf("*");
}
ch=getch();
}
}