Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- void main()
- {
- char ch[50],str1="tseccodecell@gmail.com",str2="code@tsec.com",str3="tsec@gmail.com",str4="tsec@tseccodecell.com",str5="tseccode@gmail.com",str6="codecell@gmail.com",str7="tse.c@tseccodecell.com",str8="code@tsec+code.com";
- int i=0,c=0,k;
- char temp1=".",temp2="+";
- printf("Enter the string");
- gets(ch);
- while(ch[i]!='\0')
- {
- c++;
- i++;
- }
- for(i=0;i<c;i++)
- {
- if(ch[i]==temp1)
- {
- continue;
- }
- else if(ch[i]==temp2)
- break;
- else
- {
- scanf("%c",&ch[i]);
- }
- }
- if (ch==str1||ch==str2||ch==str3||ch==str4||ch==str4||ch==str5||ch==str5||ch==str6||ch==str7||ch==str8)
- {
- printf("%s is not a unique email id",ch);
- }
- else
- {
- k++;
- }
- printf("Number of unique email ids are %d",k+6);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement