diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..369acf8 --- /dev/null +++ b/.vscode/tasks.json @@ -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 + } + } + ] +} diff --git a/loco.py b/loco.py index 5419810..3a85067 100644 --- a/loco.py +++ b/loco.py @@ -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 @@ -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") @@ -39,6 +48,7 @@ def SixNineCheck(a,b): if a == 69 or b == 69: return True else: + return False return False def GetFact(n): @@ -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(); diff --git a/main b/main new file mode 100755 index 0000000..c9a6385 Binary files /dev/null and b/main differ diff --git a/main.cpp b/main.cpp index e7fef52..339b6e4 100644 --- a/main.cpp +++ b/main.cpp @@ -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; } @@ -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: "; @@ -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]); @@ -59,4 +72,4 @@ int main(){ PrintLol(); return 0; -} +} \ No newline at end of file diff --git a/main.dSYM/Contents/Info.plist b/main.dSYM/Contents/Info.plist new file mode 100644 index 0000000..fe7fecd --- /dev/null +++ b/main.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.main + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/main.dSYM/Contents/Resources/DWARF/main b/main.dSYM/Contents/Resources/DWARF/main new file mode 100644 index 0000000..ea40436 Binary files /dev/null and b/main.dSYM/Contents/Resources/DWARF/main differ