Compare commits

..

7 Commits

Author SHA1 Message Date
Return0ne d143904c1d added a number that it likes 2021-07-24 11:41:20 -04:00
Return0ne 9ce07151d1 added string data 2021-07-22 09:28:22 -04:00
Return0ne 3a1b6549fc removed template code 2021-07-16 11:48:54 -04:00
Return0ne 3c731e9b9c add a build guide 2021-07-13 10:48:29 -04:00
Return0ne 0aa3c87ae4 added a makefile 2021-07-13 10:20:43 -04:00
Return0ne 33d9a70935 fixed a typo in TO-DO.md 2021-07-12 10:30:53 -04:00
Return0ne e6297c4fcd added TO-DO.md 2021-07-12 10:28:35 -04:00
6 changed files with 45 additions and 10 deletions

1
.gitignore vendored
View File

@ -1 +0,0 @@
log.txt

2
Makefile Normal file
View File

@ -0,0 +1,2 @@
favnum: src/main.cpp
g++ src/main.cpp -o favnum

View File

@ -1,2 +1,15 @@
this is just some hello world type C++ code with comments
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--------*
Before you can compile the code you will need GNU make and GNU g++.
This is what you should type in the command line
1. git clone https://gitdab.com/Canneddonuts/CPP_git_test
2. cd CPP_git_test
3. make

1
TO-DO.md Normal file
View File

@ -0,0 +1 @@
add a file that has the number that someone typed aswell as their name

View File

@ -1,8 +0,0 @@
#include <iostream> // 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
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
}

28
src/main.cpp Normal file
View File

@ -0,0 +1,28 @@
#include <iostream>
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
//if the number you typed is 69 then it displays Nice in the command line if not then it says it hates that number
if (UsrNum==69){
cout << "Nice \n";
} else {
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 << endl;// this displays what you type
}
int main() {
NumberInput(); // this runs the NumberInput function
PrgEnd(); // this runs the PrgEnd function
return 0;// this tells all the functions and code to go back to main aka the start
}