Added some shit

This commit is contained in:
plane000
2018-05-03 20:40:19 +01:00
parent ea36004d22
commit c5dee88e80
15 changed files with 410 additions and 23 deletions

View File

@@ -1,19 +0,0 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(Windows) Launch",
"type": "cppvsdbg",
"request": "launch",
"program": "enter program name, for example ${workspaceFolder}/a.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true
}
]
}

BIN
C++/FirstProgram/main Normal file

Binary file not shown.

View File

@@ -1,9 +1,22 @@
#include <iostream>
using namespace std;
int main() {
for (int i = 0; i < 10; i++) {
cout << i;
long factorial(int num) {
long factor = num;
for (int i = 1; i < num; i++) {
factor = i * factor;
}
return 0;
return factor;
}
int main() {
int num;
cout << "Enter a number to find it's factorial: ";
cin >> num;
long output = factorial(num);
cout << output;
cin >> num;
return 0;
}

Binary file not shown.

View File

@@ -0,0 +1,5 @@
all: main.cpp
g++ -g -Wall -o main main.cpp
clean:
$(RM) main