fork download
  1. #define _CRT_SECURE_NO_WARNINGS
  2. #include <iostream>
  3. #include <string.h>
  4.  
  5. using namespace std;
  6.  
  7. int main(){
  8. char st1[] = "привое іт";
  9. char st2[13] = "аоуиіе";
  10. char split[] = " !?/.,-:;";
  11. char result[300]{};
  12. char *ptr;
  13. int count, len;
  14. ptr = strtok(st1, split);
  15.  
  16. for(int i=0; i < 13; i++){
  17. cout << i << " " << st2[i] << endl;
  18. }
  19. // while(ptr != NULL){
  20. // count = 0;
  21. // len = strlen(ptr)-1;
  22. // for(int i=0; i<len; i++){
  23. // for(int j=0; j<strlen(st2); j++){
  24. // if(ptr[i] == st2[j])
  25. // {
  26. // cout << ptr[i];
  27. // cout << "\nst2: "<< st2[j] << " ";
  28. // count++;
  29. // cout << count<< " ";
  30. // }
  31. // }
  32. // }
  33. // cout << endl;
  34. // if((!(count%2)) and (count>2)){
  35. // strcat(result, ptr);
  36. // strcat(result, " ");
  37. // cout << result;
  38. // }
  39. // ptr = strtok(NULL, split);
  40. // }
  41.  
  42.  
  43. return 0;
  44. }
Success #stdin #stdout 0.01s 5304KB
stdin
Standard input is empty
stdout
0 �
1 �
2 �
3 �
4 �
5 �
6 �
7 �
8 �
9 �
10 �
11 �
12