SHARE
TWEET

Untitled

a guest Oct 21st, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. string input[4] = {"Word1", "Word2", "Word3", "Word4"};
  6.  
  7. void in()
  8. {
  9.   cout << "Please enter the first word to be echoed:\n";
  10.   cin >> input[0];
  11.   cout << "Please enter the second word to be echoed:\n";
  12.   cin >> input[1];
  13.   cout << "Please enter the third word to be echoed:\n";
  14.   cin >> input[2];
  15.   cout << "Please enter the fourth word to be echoed:\n";
  16.   cin >> input[3];
  17. }
  18.  
  19. void out()
  20. {
  21.   cout << "Echoed text:\n";
  22.   cout << input;
  23. }
  24.  
  25. int main()
  26. {
  27.   in();
  28.   out();
  29. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top