Advertisement
Guest User

Untitled

a guest
Oct 5th, 2018
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main()
  5. {
  6. char username[10];
  7. int password=123456;
  8. int p;
  9.  
  10. printf("please insert your username:");
  11. scanf("%s",&username);
  12.  
  13. printf("please insert your password:");
  14. scanf("%d",&p);
  15.  
  16. if(strcmp(username,"itp")==0)
  17. {
  18. if(password==p)
  19. {
  20. printf("you have succesfully login!");
  21. }
  22. else
  23. {
  24. printf("your password is incorect!");
  25. return 0;
  26. }
  27. }
  28. else
  29. {
  30. printf("your username is incorect!");
  31. }
  32.  
  33.  
  34. return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement