Advertisement
Guest User

Untitled

a guest
Aug 5th, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(void)
  5. {
  6. char buff[15];
  7. int pass = 0;
  8.  
  9. printf("\n Enter the password : \n");
  10. gets(buff);
  11.  
  12. if(strcmp(buff, "password"))
  13. {
  14. printf ("\n Wrong Password \n");
  15. }
  16. else
  17. {
  18. printf ("\n Correct Password \n");
  19. pass = 1;
  20. }
  21.  
  22. if(pass)
  23. {
  24.  
  25. printf ("\n Ok User \n");
  26. }
  27.  
  28. return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement