diff --git a/Makefile b/Makefile index f5bfa7f..a8dc007 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,2 @@ -soup: src/main.cpp - g++ src/main.cpp -o soup +favnum: src/main.cpp + g++ src/main.cpp -o favnum diff --git a/README.md b/README.md index 40a4584..3b44a42 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -This is just some hello world type C++ code with comments read below for build instructions +Have you ever wanted to know what your PC thinks about your favorite number if so, then this litle C++ program has got you covered. + + *--------Building--------* diff --git a/src/main.cpp b/src/main.cpp index 24e4016..f6bface 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,8 +1,15 @@ -#include // this includes the standard lib to input and output stuff -using namespace std;// without this we would have to write std::cout insted of just cout +#include +using namespace std; + +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 +} int main() { - cout << "Soup \n"; // this prints soup in the command line and the \n means go down a line - cout << "Is good"; - return 0;// this tells all the functions and code to go back to main aka the start + NumberInput(); // this runs the NumberInput function + return 0;// this tells all the functions and code to go back to main aka the start } +