Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- // this simple app is a password console app. It will ask for a password only
- int main ()
- {
- char user[6] = "admin";
- char pass[4] = "abc";
- printf("What is the username to login in?");
- scanf("%s",&user);
- printf("What is the password to login in?");
- scanf("%s",&pass);
- if(strcmp(user,"admin")== 1 && strcmp(pass,"abc")==1 ){
- printf("You answered the right user and pass, you are now loged in");
- }else{
- printf("wrong user,password. Please try again");
- }
- getchar();
- getchar();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement