Display as "******"

Excuse me,may I ask one thing.. How to make the numbers that I type in the keyboard to be displayed as *****? Just like we usually enter a password,and it appear as *****.. What is the pseudocode to run as I mention above? By the way,I'm still a student.. I've read the forum,but actually I don't use that kind of commands.. I use the command as below.. What mistake did I've done? And I'm sund Borland C++..

#include <stdio.h>
#include <conio.h>

main()
{
int x;
do
{
printf("Enter Password : ");
if (x!=0 && x !=13)
{
scanf("%s",&x);
printf("*",x);
}
}while (x != 13);

getch();
return(0);
}
Do not post duplicate topics
Last edited on
Topic archived. No new replies allowed.