Guest User

Untitled

a guest
Apr 16th, 2018
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdio.h>
  3. #include <string.h>
  4.  
  5. using namespace std;
  6.  
  7. void String(char a[])
  8. {
  9.     char eng[] = {"qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM"},*uch,*ulet,*unew;
  10.     for (uch=a;uch<a+strlen(a);uch++){
  11.         for (ulet=eng;ulet<eng+strlen(eng)&&*ulet!=*uch;ulet++);
  12.             if (ulet != eng+strlen(eng))
  13.             {
  14.                 for(unew = a+strlen(a)+1 ; unew > uch; unew--)
  15.                 *(unew+1) = *unew;
  16.                 *(uch) = '*';
  17.                 *(uch+1) = '*';
  18.             }
  19.     }
  20. }
  21.  
  22. int main()
  23. {
  24.     char a[30];
  25.     puts("Enter string");
  26.     gets(a);
  27.     String(a);
  28.     puts(a);
  29. }
Add Comment
Please, Sign In to add comment