Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int i,j=0,d=0;
- char a[50],b[50];
- cout<<"Enter the input"<<endl;
- cin>>a;
- for(i=0;a[i]!='\0';i++)
- {
- if((a[i]>=0&&a[i]<=64)||(a[i]>=91&&a[i]<=96)||(a[i]>=123&&a[i]<=255))
- {
- b[d]=a[i];
- d++;
- }
- else if(a[i]!='a'&&a[i]!='U'&&a[i]!='O'&&a[i]!='I'&&a[i]!='E'&&a[i]!='A'&&a[i]!='u'&&a[i]!='o'&&a[i]!='i'&&a[i]!='e')
- {
- b[d]='#';
- d++;
- b[d]=a[i];
- d++;
- }
- }
- for(i=0;i<d;i++)
- {
- if (b[i]>='a'&&b[i]<='z')
- b[i]=b[i]-32;
- else if (b[i]>='A'&&b[i]<='Z')
- b[i]=b[i]+32;
- else b[i]=b[i];
- }
- for(i=0;i<d;i++)
- cout<<b[i];
- cout<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement