Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.62 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stddef.h>
  3. #include <locale.h>
  4. #include <wchar.h>
  5.  
  6. int main() {
  7.     setlocale (LC_ALL, "ru_RU.UTF-8");
  8.     wchar_t vowels[] = L"аоиеёэыуюяАОИЕЁЭЫУЮЯ";
  9.     wchar_t text[] = L"Этот текст написан на русском языкe";
  10.     wprintf(L"Оригинал: \n %ls \n", text);
  11.     int i = 0;
  12.     wchar_t *isVowels;
  13.     while(text[i] != '\0'){
  14.  
  15.         isVowels = wcschr(vowels,text[i]);
  16.         if(isVowels){
  17.             text[i] = '+';
  18.         }
  19.         i++;
  20.     }
  21.     wprintf(L"Обработанный текст: \n %ls \n", text);
  22.  
  23.     return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement