Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<string.h>
  3. void main()
  4. {
  5. 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";
  6. int i=0,c=0,k;
  7. char temp1=".",temp2="+";
  8. printf("Enter the string");
  9. gets(ch);
  10. while(ch[i]!='\0')
  11. {
  12. c++;
  13. i++;
  14. }
  15. for(i=0;i<c;i++)
  16. {
  17. if(ch[i]==temp1)
  18. {
  19. continue;
  20. }
  21. else if(ch[i]==temp2)
  22. break;
  23. else
  24. {
  25. scanf("%c",&ch[i]);
  26. }
  27. }
  28. if (ch==str1||ch==str2||ch==str3||ch==str4||ch==str4||ch==str5||ch==str5||ch==str6||ch==str7||ch==str8)
  29. {
  30. printf("%s is not a unique email id",ch);
  31. }
  32. else
  33. {
  34. k++;
  35. }
  36. printf("Number of unique email ids are %d",k+6);
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement