Advertisement
deathkostis

Untitled

Dec 2nd, 2016
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4. /* run this program using the console pauser or add your own getch, system("pause") or input loop */
  5.  
  6. char username[50];
  7. char password [50];
  8.  
  9. void login (char username, char password);
  10.  
  11. int main(int argc, char *argv[]) {
  12.  
  13. login(username, password);
  14.  
  15. }
  16.  
  17. void login(char username, char password)
  18. {
  19. do
  20. {
  21. printf("Please provide a username: \n");
  22. scanf("%s", username);
  23. }while(strcmp(username, "movie") != 0);
  24.  
  25. do
  26. {
  27. printf("Please provide a password: \n");
  28. scanf("%s", password);
  29. }while(strcmp(password, "mo") != 0);
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement