Advertisement
Rea_pErz

String Task

Jul 20th, 2015
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     string ayt;
  8.     int i,j=0;
  9.     cin>>ayt;
  10.    
  11.     for(i=0;i<ayt.length();i++)
  12.     {
  13.        
  14.         //check
  15.         if(ayt[i] == 'a' || ayt[i] == 'e' || ayt[i] == 'i' || ayt[i] == 'o' || ayt[i] == 'u' || ayt[i] == 'A' || ayt[i] == 'E' || ayt[i] == 'I' || ayt[i] == 'O' || ayt[i] == 'U' && ayt[i] >= 'A' && ayt[i] <= 'Z' )
  16.         {
  17.             ayt[i] = '\0'; //delete vowel
  18.         }
  19.         else
  20.         {
  21.             ayt[i] = tolower(ayt[i]); //tukar huruf besar jdi kecik
  22.             cout<<'.'<<ayt[i];
  23.         }
  24.        
  25.     }
  26.    
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement