Advertisement
Guest User

Untitled

a guest
Dec 7th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<string.h>
  3. #include<wchar.h>
  4. #include<locale.h>
  5. int main(){
  6.     setlocale(LC_CTYPE, "");
  7.     wchar_t text[200];
  8.     fgetws(text, 200, stdin);
  9.     wchar_t* buffer;
  10.     wchar_t* pch = wcstok(text, L" -,", &buffer);
  11.     while (pch != NULL){
  12.         wprintf(L"%ls\n", pch);
  13.         pch = wcstok(text, L" -,", &buffer);
  14.     }
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement