In this program, we create a login system program which takes username and password from the user.
#include<stdio.h>
#include<conio.h>
#include<string.h>
int main(){
char username[20];
char userpassword[20];
int i;
printf("Enter the User Name : ");
gets(username);
printf("Enter the Password : ");
gets(userpassword);
printf("\n\n****\tEnter Any Key to Continue\t****");
getch();
if(!strcmp(username, "exampleuser") && !strcmp(userpassword, "example123")){
printf("\n\n****\tLogin Successful\t****");
}else{
printf("\n\n****\tProvided Information Incorrect. Please Provide Right Information!!\t****");
}
return 0;
}
Comments
Oops!