Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- #include<stdlib.h>
- int main(void){
- char log_success = 0;
- char user_info[14];
- char user = 'F', pass = 'F';
- char pass_info[12];
- printf("Enter UserID: \n");
- scanf("%s",user_info);
- printf("Enter Password: \n");
- scanf("%s",pass_info);
- if(strcmp(user_info,"secureassign"))
- {
- printf("The UserID is incorrect. \n");
- }
- else{
- printf("Correct UserID \n");
- user = 'T';
- }
- if(strcmp(pass_info,"abcd1234"))
- {
- printf("The password you entered is incorrect. \n");
- }
- else{
- printf("Correct password \n");
- pass = 'T';
- }
- if((pass!='F' && user!='F'))
- {
- printf("You have successfully logged in. \n");
- printf("You are now System Admin. Root privileges given. \n");
- }
- printf(user_info);
- printf(pass_info);
- printf("\n");
- return 0;
- }
Add Comment
Please, Sign In to add comment