SHARE
TWEET

Untitled

a guest Oct 16th, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top