Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. string words[100];
  9. int number;
  10. cout << "How many words would you like to work with? ";
  11. cin >> number;
  12.  
  13. for (int i = 0; i < number; i++)
  14. {
  15. words[i];
  16. cin >> words[i];
  17. cout << words[i] << " ";
  18. }
  19.  
  20. cout << endl;
  21.  
  22. for (int i = number - 1; i >= 0; i--)
  23. {
  24. words[i];
  25. cout << words[i] << " ";
  26. }
  27.  
  28. return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement