Advertisement
Guest User

Untitled

a guest
Nov 2nd, 2016
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. int main(void) {
  2.  
  3. char username[20];
  4. char password[20];
  5. int i;
  6.  
  7.  
  8. printf("Welcome !\n\n\n");
  9. printf("LOGIN \n\n");
  10.  
  11. while (i!=1) {
  12. if (((strcmp(username, "maths")==0) && (strcmp(password, "123a")==0)) || ((strcmp(username, "stats")==0) && (strcmp(password, "4321")==0))) {
  13. i=1;
  14. }
  15.  
  16. else {
  17. printf("Username : ");
  18. scanf("%s",&username);
  19. printf("Password : ");
  20. scanf("%s",&password);
  21. }
  22. }
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement