Guest User

Untitled

a guest
Jan 22nd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<conio.h>
  3. #include<string.h>
  4. #include<process.h>
  5. void main(){
  6. char ch;
  7. char str1[20],str2[20];
  8. int l,i,j;
  9. clrscr();
  10. printf("ENTER PASSWORD::\n");
  11. scanf("%s",str1);
  12. l=strlen(str1);
  13. for(i=0,j=0;j<l-1;j++){
  14. str2[i]=str1[j];
  15. ch=str1[j+1];
  16. if(ch==str2[i]){
  17. printf("REJECTED");
  18. getch();
  19. exit(0);
  20. }
  21. else continue;
  22. }
  23. printf("ACCEPTED");
  24. getch();
  25. }
Add Comment
Please, Sign In to add comment