Advertisement
Guest User

Untitled

a guest
Mar 31st, 2020
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #include <iostream>
  2. #include <conio.h>
  3. #include <cstring>
  4. #include <cstdio>
  5.  
  6. using namespace std;
  7.  
  8. string losowanieSlowa()
  9. {
  10. int a;
  11.  
  12. string slowa[4];
  13.  
  14. slowa[0] = "m a m a";
  15. slowa[1] = "d u p a";
  16. slowa[2] = "p i e s";
  17. slowa[3] = "t a t a";
  18. slowa[4] = "k o t";
  19.  
  20. char str[] = slowa[1];
  21. char korektor[] = " ";
  22. char *token = strtok(str,korektor);
  23. while (token)
  24. {
  25. cout << token << endl;
  26. token = strtok(NULL,korektor);
  27. }
  28.  
  29. }
  30.  
  31.  
  32.  
  33. int main()
  34. {
  35. losowanieSlowa();
  36.  
  37. return 0;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement