SHARE
TWEET

Untitled

a guest Oct 21st, 2019 80 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.   for(int i = 0; i < 4; i++)
  23.   {
  24.   cout << input[i];
  25.   }
  26. }
  27.  
  28. int main()
  29. {
  30.   in();
  31.   out();
  32. }
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