Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<conio.h>
- #include<string.h>
- #include<process.h>
- void main(){
- char ch;
- char str1[20],str2[20];
- int l,i,j;
- clrscr();
- printf("ENTER PASSWORD::\n");
- scanf("%s",str1);
- l=strlen(str1);
- for(i=0,j=0;j<l-1;j++){
- str2[i]=str1[j];
- ch=str1[j+1];
- if(ch==str2[i]){
- printf("REJECTED");
- getch();
- exit(0);
- }
- else continue;
- }
- printf("ACCEPTED");
- getch();
- }
Add Comment
Please, Sign In to add comment