Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "clang++ build active file",
"command": "/usr/bin/clang++",
"args": [
"-std=c++17",
"-stdlib=libc++",
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": ["$gcc"],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
29 changes: 24 additions & 5 deletions loco.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#This is a python port of main.cpp

def DivTwo(a,b):
return a/b

def ModTwo(a,b):
return a%b

Expand All @@ -11,7 +14,13 @@ def AddTwo(a,b):

def SubTwo(a,b):
return a-b
def DivTwo(a,b):
return a/b

def PrintLol():
print("\n---LOL---\n")
def Cry():
print("\n-----Cry----\n")
def PrintEnd():
print("\n---End---\n")

Expand Down Expand Up @@ -39,6 +48,7 @@ def SixNineCheck(a,b):
if a == 69 or b == 69:
return True
else:
return False
return False

def GetFact(n):
Expand All @@ -64,12 +74,21 @@ def main():
if SixNineCheck(num1, num2):
print("\n\nOhhh! 69 is a nice choice ( ͡~ ͜ʖ ͡°)")

print("What opperation to perform 1. Addition \n 2.Subtraction \n 3.Multiplication \n 4.Division \n 5.Modulo \n 6.Factorial")
print("1.Addition = A \n 2.Subtraction = S \n 3.Multiplication = M \n 4. Division = D \n 5.Modulo = Mod \n 6. Factorial = F")
value = str(input("\n Enter opperation: "))

#Printing operations on the two numbers
print("The sum is: " + str(AddTwo(num1, num2)))
print("The difference is: " + str(SubTwo(num1, num2)))
print("The product is: " + str(MultTwo(num1, num2)))
print("The mod is: " + str(ModTwo(num1, num2)))
print("The Factorials are: ", GetFact(num1), " and ", GetFact(num2))
if(value == "A" or value == "a"):
print("The sum is: " + str(AddTwo(num1, num2)))
if(value == "S" or value == "s"):
print("The difference is: " + str(SubTwo(num1, num2)))
if(value == "M" or value == "m"):
print("The product is: " + str(MultTwo(num1, num2)))
if(value == "Mod" or value == "m"):
print("The mod is: " + str(ModTwo(num1, num2)))
if(value == "F" or value == "f"):
print("The Factorials are: ", GetFact(num1), " and ", GetFact(num2))

#Footer
PrintEnd();
Expand Down
Binary file added main
Binary file not shown.
17 changes: 15 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ int SubTwo(int a, int b){
return a-b;
}

int DivTwo(int a, int b){
return float(a/b);
}
void PrintLol(){
cout << endl << "LOL" << endl;
}
Expand All @@ -27,6 +30,7 @@ void PrintHeader(){
cout << "----GIT TESTING DUMMY APPLICATION V 0.02---\n\n";
}


void GetAndPrintName(){
string name;
cout << endl << "Enter your name: ";
Expand All @@ -49,8 +53,17 @@ int main(){
if(num[0]==69 || num[1] == 69){
cout << endl << "ohh!, 69 is a nice choice " << endl;
}

string value;
cout << "What opperation to perform Addition/Subtraction/Multiplication/Division/Modulo";
cout << "Addition = A Subtraction = S Multiplication = M Division = D Modulo = Mod";
cout << endl << " Enter opperation: "<< endl;
cin >> value ;
//Printing operations of those numbers
if(value == "a" || "A") {cout << "\nThe sum is: " << AddTwo(num[0], num[1]);}
if (value == "s" || "S"){ cout << "\nThe difference is: " << SubTwo(num[0], num[1]);}
if (value == "m" || "M"){cout << "\nThe product is: " << MultTwo(num[0], num[1]);}
if (value == "Mod" || "mod"){cout << "\nThe mod is: " << ModuloTwo(num[0], num[1]);}
if (value == "D" || "d"){cout << "\nThe mod is: " << DivTwo(num[0], num[1]);}
cout << "\nThe sum is: " << AddTwo(num[0], num[1]);
cout << "\nThe difference is: " << SubTwo(num[0], num[1]);
cout << "\nThe product is: " << MultTwo(num[0], num[1]);
Expand All @@ -59,4 +72,4 @@ int main(){

PrintLol();
return 0;
}
}
20 changes: 20 additions & 0 deletions main.dSYM/Contents/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.main</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
Binary file added main.dSYM/Contents/Resources/DWARF/main
Binary file not shown.