Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stddef.h>
- #include <locale.h>
- #include <wchar.h>
- int main() {
- setlocale (LC_ALL, "ru_RU.UTF-8");
- wchar_t vowels[] = L"аоиеёэыуюяАОИЕЁЭЫУЮЯ";
- wchar_t text[] = L"Этот текст написан на русском языкe";
- wprintf(L"Оригинал: \n %ls \n", text);
- int i = 0;
- wchar_t *isVowels;
- while(text[i] != '\0'){
- isVowels = wcschr(vowels,text[i]);
- if(isVowels){
- text[i] = '+';
- }
- i++;
- }
- wprintf(L"Обработанный текст: \n %ls \n", text);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement