Advertisement
Guest User

Untitled

a guest
Aug 31st, 2015
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. string prompt_user(string input_prompt){
  5. string reply;
  6. cout << input_prompt << endl;
  7. cin >> reply; //only use one of these two lines.
  8. //getline(cin, reply);
  9. return reply;
  10. };
  11.  
  12. int main(){
  13. string response = prompt_user("How are you doing today?");
  14. cout << "You said: " << response << endl;
  15. response = prompt_user("Is it your birthday?");
  16. cout << "You said: " << response << endl;
  17. return 0;
  18. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement