removed template code
This commit is contained in:
parent
3c731e9b9c
commit
3a1b6549fc
3 changed files with 17 additions and 8 deletions
4
Makefile
4
Makefile
|
@ -1,2 +1,2 @@
|
||||||
soup: src/main.cpp
|
favnum: src/main.cpp
|
||||||
g++ src/main.cpp -o soup
|
g++ src/main.cpp -o favnum
|
||||||
|
|
|
@ -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--------*
|
*--------Building--------*
|
||||||
|
|
17
src/main.cpp
17
src/main.cpp
|
@ -1,8 +1,15 @@
|
||||||
#include <iostream> // this includes the standard lib to input and output stuff
|
#include <iostream>
|
||||||
using namespace std;// without this we would have to write std::cout insted of just cout
|
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() {
|
int main() {
|
||||||
cout << "Soup \n"; // this prints soup in the command line and the \n means go down a line
|
NumberInput(); // this runs the NumberInput function
|
||||||
cout << "Is good";
|
return 0;// this tells all the functions and code to go back to main aka the start
|
||||||
return 0;// this tells all the functions and code to go back to main aka the start
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue