Advertisement
Guest User

137

a guest
Oct 18th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4. int main()
  5. {
  6.     char a[250];
  7.     int i,n,v[30]={};
  8.     cin.getline(a,250);
  9.     n=strlen(a);
  10.     for(i=0;i<n;i++)
  11.     {
  12.         if('a' <= a[i] && a[i]<='z')
  13.         {
  14.             int poz=0;
  15.             poz=a[i]-'a';
  16.             if(v[poz]==0)
  17.                 cout<<a[i]<<" ";
  18.             v[poz]++;
  19.         }
  20.     }
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement