I read this one:
simple-c-code-vt599.html
Tht ws really borin!
The password seems normal! no nothing like ******...
I made my own! How is it?
Quote:
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<string.h>
void main()
{
pass:
char p[10];
puts("Please set a password.\n");
puts("Enter Your Password : ");
char a[10];
for(int i=0;; i++)
{
p[i]=getch();
if(p[i]==13)
{
puts("\b");
break;
}
putch('*');
}
p[i]='\0';
puts("\nConfirm Password : ");
for(i=0; a[i]!='\0'; i++)
{
a[i]=getch();
if(a[i]==13)
{
break;
}
putch('*');
}
a[i]='\0';
int f=0;
for(i=0; i<strlen(a);i++)
{
if(a[i]!=p[i])
f=1;
}
if(f||strlen(a)!=strlen(p))
{
puts("\n\nPassword did not match.Please reset. ");
goto pass;
}
else
puts("\n\nPassword Accepted");
puts("\n\nPress any key to exit");
getch();
}