Members BookmarksPolls Fresher Jobs Funny Pictures MCA Projects New Member FAQ  



My Profile
Active Members
TodayLast 7 Days more...



Awards & Gifts
Online Exams

Fresher Jobs


Our fresher job section is exclusively for fresh graduates! Find jobs for freshers in major Indian cities including Bangalore, Chennai, Hyderabad, Pune or Kochi

Resources


Find educational articles, blogs, discussion threads and other resources.

Colleges


Find details about any college in India or search for courses.

Advertisements


website counter



C Program: Login


Posted Date: 04 Nov 2007    Resource Type: Articles/Knowledge Sharing    Category: Computer & Technology

Posted By: Arun Jadhav       Member Level: Diamond
Rating:     Points: 5



Anther C program : Login

#include
#include
#include
void main()
{
char userid[]="zion",password[]="zionatscodz",p[15],u[15];
int n=1,a,b;
printf("\nEnter USER ID and PASSWORD below (You have only three chances to enter)");
getch();
while(n<=3)
{
clrscr();
printf("\nUSER ID: ");
scanf("%s",u);
printf("\nPASSWORD: ");
scanf("%s",p);
a=strcmp(u,userid);
b=strcmp(p,password);
if(a==0&&b==0)
{
printf("\nYou have logged in successfully.");
break;
}
else
{
printf("\nWrong PASSWORD and/or USER ID. Now you have
% d more chance/s.",3-n);
}
getch();
n++;
}
if(n==4)
printf("\nYou can't log in.");
getch();
}


In above program the USERID is "zion" & corresponding PASSWORD :"zionatscodz".
If you able to enter it correctly. It will print "You have logged in successfully".
If you fail to do so then it will print "You can't logged in".
For more details check my profile :http://www.scodz.com/ViewProgram.php?link=920&uid=474






Responses

Author: Jagadeesan. D    17 Dec 2007Member Level: Silver   Points : 1
Good program


Author: Arun Jadhav    17 Dec 2007Member Level: Diamond   Points : 3
Hi Jagadeesan. D,
Thank you for your complements. I have written various programs. Some of them are posted in the indiastudychannel resource section. For my other programs please visit my profile at http://www.scodz.com/ViewProfile.php?uid=474.
Thanks and Regards
Arun Jadhav


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: C Program-Tower of Hanoi
Previous Resource: Dotnet Basics
Return to Discussion Resource Index
Post New Resource
Category: Computer & Technology


Post resources and earn money!
 
Related Resources


Contact Us    Privacy Policy    Terms Of Use   

SpiderWorks Technologies Pvt Ltd. 2006 - 2007 All Rights Reserved.