Advertisement
Guest User

Untitled

a guest
Oct 21st, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include <iostream>
  2. #include <string.h>
  3. #include <stdlib.h>
  4. using namespace std;
  5.  
  6. class P6{
  7. private:
  8. public:
  9. void run()
  10. {
  11. int k;
  12. cout << "Cate cuvinte ai: ";
  13. cin >> k;
  14. invers(k);
  15.  
  16. cout << endl;
  17. system("PAUSE");
  18. }
  19.  
  20. void invers(int k)
  21. {
  22. if (k > 0)
  23. {
  24. char word[255];
  25. cout << "Introduceti un cuvant: ";
  26. cin.get();
  27. cin.get(word, 255, '\n');
  28. invers(k-1);
  29. cout << word << " ";
  30. }
  31. }
  32. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement