Advertisement
kxcoze

__satie__

Apr 19th, 2020
445
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.24 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>                                                                          
  3.        
  4. using namespace std;        
  5.      
  6. int main() {              
  7.     setlocale(LC_ALL, "rus");    
  8.     char text[200];    
  9.     char alph[] = "абвгдеёжзийклмнопрстуфхцчшщъыьэюя";    
  10.     fgets(text, sizeof(text), stdin);                                              
  11.     fflush(stdin);    
  12.                                                                            
  13.     for (int i = 0; i < strlen(text); i++) {                                                
  14.         for (int j = 0; j < strlen(alph); j++) {                                                                    
  15.             if (text[i] == alph[j])                                                                                  
  16.                 cout << text[i];                                                                    
  17.         }                                                                        
  18.     }                                                                                                      
  19.     return 0;                                                                                                  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement