added string data
This commit is contained in:
parent
3a1b6549fc
commit
9ce07151d1
1 changed files with 9 additions and 1 deletions
10
src/main.cpp
10
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue