Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- string input[4] = {"Word1", "Word2", "Word3", "Word4"};
- void in()
- {
- cout << "Please enter the first word to be echoed:\n";
- cin >> input[0];
- cout << "Please enter the second word to be echoed:\n";
- cin >> input[1];
- cout << "Please enter the third word to be echoed:\n";
- cin >> input[2];
- cout << "Please enter the fourth word to be echoed:\n";
- cin >> input[3];
- }
- void out()
- {
- cout << "Echoed text:\n";
- cout << input;
- }
- int main()
- {
- in();
- out();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement