#include<iostream>
#include<string>

using namespace std;
string input;

void enterstring() {
    cout<<"\nEnter input: ";
    getline(cin,input);
}

void displaystring() {
    cout<<"\nyour string is "<<input<<endl;
}

int main() {

    int choice=0;
    while(choice!=3) {

        cout<<"Enter choice: ";
        cin>>choice;
        switch(choice) {
        case 1: enterstring();
            break;
        case 2: displaystring();
            break;
        case 3: cout<<"\nQuit";
            break;
        default: cout<<"\ninvalid choice try again";
        }
    }
    return 0;
}