Advertisement
Guest User

Untitled

a guest
Oct 5th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.47 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3.  
  4. int main(){
  5.     char username,password;
  6.  
  7.  
  8.     printf("Username: ");scanf("%s",&username);fflush(stdin);
  9.     printf("Password: ");scanf("%s",&password);fflush(stdin);
  10.  
  11.  
  12.     for (int count = 1; count <=3; count++ ){
  13.         if (strcmp(username,"Admin") == 0 && strcmp(password,"admin")){
  14.             printf("Welcome to My System \n");
  15.             break;
  16.         }
  17.        
  18.         else
  19.           printf ("%d time(s) more",3-count);
  20.     }
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement