Flash Games

 FAQ   Search   Members   Groups   Register  User Control Panel      Login 

Your time now:
Mon Nov 23, 2009 8:10 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ]  Bookmark and Share
Author Message
 Post subject: A password program!
PostPosted: Thu May 10, 2007 7:09 pm 
Offline
50+ Club
User avatar

Joined: Thu Sep 28, 2006 8:44 pm
Posts: 63
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();
}

_________________
----
$even@ce$
Steel is Iron + Fire!!!
My Official web-site : http://www.vpirates.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group - Flash Games - TNX Invitation Code - TNX Review


Webmaster - Excruciating - Johnathan - Kotik - Ash - Tomi - rangana - Phate - dflynn - Medley