From 9ce07151d119e8e485f75462086b6c01a5af592a Mon Sep 17 00:00:00 2001 From: Mark B Date: Thu, 22 Jul 2021 09:28:22 -0400 Subject: [PATCH] added string data --- src/main.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index f6bface..002d82e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5,11 +5,19 @@ void NumberInput() { int UsrNum; // this makes a variable cout << "Type your favorite number will ya: "; cin >> UsrNum; // this gets checks for user input and loads it into UsrNum - cout << "Ew I hate the number " << UsrNum; // this displays the number in UsrNum + cout << "Ew I hate the number " << UsrNum << endl; // this displays the number in UsrNum and then to go down a line +} + +void PrgEnd() { + string Name; // this makes a string called name + cout << "To exit the program please type your name: "; + cin >> Name; // this gets what you typed + cout << "Thanks for playing: " << Name;// this displays what you type } int main() { NumberInput(); // this runs the NumberInput function + PrgEnd(); return 0;// this tells all the functions and code to go back to main aka the start }