You are on page 1of 1

#include<iostream.

h>
#include<conio.h>
void main()
{
clrscr();
char pwd[5];
int i=0;
while(i<5)
{
pwd[i]=getch();
cout<<"*";
++i;
}
cout<<pwd;
if (pwd=="sumit")
cout<<"correct password";
else
cout<<"wrong password";

getch();
}

You might also like