From 677e0bb832c9cc9c69544ed41d9eac98bf5a30ec Mon Sep 17 00:00:00 2001 From: JacobAKnox <91796123+JacobAKnox@users.noreply.github.com> Date: Wed, 27 Oct 2021 20:38:30 -0700 Subject: Adding my work so far --- .gitignore | 5 + .vs/Project2/v16/.suo | Bin 0 -> 45056 bytes .vs/Project2/v16/Browse.VC.db | Bin 0 -> 16379904 bytes .../AutoPCH/18d67ed188651b3a/KNOXFUNCTIONS.ipch | Bin 0 -> 393216 bytes .../ipch/AutoPCH/7aa84c9453a0bac0/PROJECT2.ipch | Bin 0 -> 35520512 bytes .../ipch/AutoPCH/7b43f03daa1023e2/PROJECT2.ipch | Bin 0 -> 35520512 bytes .../AutoPCH/92593e019d2a2ca6/KNOXFUNCTIONS.ipch | Bin 0 -> 35717120 bytes .../AutoPCH/a471a0754d7a9194/KNOXFUNCTIONS.ipch | Bin 0 -> 35717120 bytes .vs/ProjectSettings.json | 3 + .vs/VSWorkspaceState.json | 7 + .vs/cst116proj2-1-jacob-k-and-austin-g/v16/.suo | Bin 0 -> 32256 bytes .../v16/Browse.VC.db | Bin 0 -> 253952 bytes .../v16/Browse.VC.db-shm | Bin 0 -> 32768 bytes .../v16/Browse.VC.db-wal | 0 .vs/slnx.sqlite | Bin 0 -> 335872 bytes Debug/KnoxFunctions.obj | Bin 0 -> 162643 bytes Debug/Project2.exe | Bin 0 -> 71680 bytes Debug/Project2.exe.recipe | 11 ++ Debug/Project2.ilk | Bin 0 -> 568032 bytes Debug/Project2.log | 2 + Debug/Project2.obj | Bin 0 -> 35714 bytes Debug/Project2.pdb | Bin 0 -> 1740800 bytes Debug/Project2.tlog/CL.command.1.tlog | Bin 0 -> 3370 bytes Debug/Project2.tlog/CL.read.1.tlog | Bin 0 -> 81728 bytes Debug/Project2.tlog/CL.write.1.tlog | Bin 0 -> 3266 bytes Debug/Project2.tlog/Project2.lastbuildstate | 2 + Debug/Project2.tlog/link.command.1.tlog | Bin 0 -> 3166 bytes Debug/Project2.tlog/link.read.1.tlog | Bin 0 -> 7882 bytes Debug/Project2.tlog/link.write.1.tlog | Bin 0 -> 1562 bytes Debug/Project2.vcxproj.FileListAbsolute.txt | 2 + Debug/vc142.idb | Bin 0 -> 281600 bytes Debug/vc142.pdb | Bin 0 -> 512000 bytes KnoxFunctions.cpp | 98 +++++++++++++ KnoxPseudoCode.txt | 25 ++++ Project2.cpp | 18 +++ Project2.sln | 31 +++++ Project2.vcxproj | 151 +++++++++++++++++++++ Project2.vcxproj.filters | 30 ++++ Project2.vcxproj.user | 6 + header.h | 13 ++ 40 files changed, 404 insertions(+) create mode 100644 .gitignore create mode 100644 .vs/Project2/v16/.suo create mode 100644 .vs/Project2/v16/Browse.VC.db create mode 100644 .vs/Project2/v16/ipch/AutoPCH/18d67ed188651b3a/KNOXFUNCTIONS.ipch create mode 100644 .vs/Project2/v16/ipch/AutoPCH/7aa84c9453a0bac0/PROJECT2.ipch create mode 100644 .vs/Project2/v16/ipch/AutoPCH/7b43f03daa1023e2/PROJECT2.ipch create mode 100644 .vs/Project2/v16/ipch/AutoPCH/92593e019d2a2ca6/KNOXFUNCTIONS.ipch create mode 100644 .vs/Project2/v16/ipch/AutoPCH/a471a0754d7a9194/KNOXFUNCTIONS.ipch create mode 100644 .vs/ProjectSettings.json create mode 100644 .vs/VSWorkspaceState.json create mode 100644 .vs/cst116proj2-1-jacob-k-and-austin-g/v16/.suo create mode 100644 .vs/cst116proj2-1-jacob-k-and-austin-g/v16/Browse.VC.db create mode 100644 .vs/cst116proj2-1-jacob-k-and-austin-g/v16/Browse.VC.db-shm create mode 100644 .vs/cst116proj2-1-jacob-k-and-austin-g/v16/Browse.VC.db-wal create mode 100644 .vs/slnx.sqlite create mode 100644 Debug/KnoxFunctions.obj create mode 100644 Debug/Project2.exe create mode 100644 Debug/Project2.exe.recipe create mode 100644 Debug/Project2.ilk create mode 100644 Debug/Project2.log create mode 100644 Debug/Project2.obj create mode 100644 Debug/Project2.pdb create mode 100644 Debug/Project2.tlog/CL.command.1.tlog create mode 100644 Debug/Project2.tlog/CL.read.1.tlog create mode 100644 Debug/Project2.tlog/CL.write.1.tlog create mode 100644 Debug/Project2.tlog/Project2.lastbuildstate create mode 100644 Debug/Project2.tlog/link.command.1.tlog create mode 100644 Debug/Project2.tlog/link.read.1.tlog create mode 100644 Debug/Project2.tlog/link.write.1.tlog create mode 100644 Debug/Project2.vcxproj.FileListAbsolute.txt create mode 100644 Debug/vc142.idb create mode 100644 Debug/vc142.pdb create mode 100644 KnoxFunctions.cpp create mode 100644 KnoxPseudoCode.txt create mode 100644 Project2.cpp create mode 100644 Project2.sln create mode 100644 Project2.vcxproj create mode 100644 Project2.vcxproj.filters create mode 100644 Project2.vcxproj.user create mode 100644 header.h diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8ab8ee8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +################################################################################ +# This .gitignore file was automatically created by Microsoft(R) Visual Studio. +################################################################################ + +/.vs/cst116proj2-1-jacob-k-and-austin-g/v16/Browse.VC.opendb diff --git a/.vs/Project2/v16/.suo b/.vs/Project2/v16/.suo new file mode 100644 index 0000000..4a857f7 Binary files /dev/null and b/.vs/Project2/v16/.suo differ diff --git a/.vs/Project2/v16/Browse.VC.db b/.vs/Project2/v16/Browse.VC.db new file mode 100644 index 0000000..264c128 Binary files /dev/null and b/.vs/Project2/v16/Browse.VC.db differ diff --git a/.vs/Project2/v16/ipch/AutoPCH/18d67ed188651b3a/KNOXFUNCTIONS.ipch b/.vs/Project2/v16/ipch/AutoPCH/18d67ed188651b3a/KNOXFUNCTIONS.ipch new file mode 100644 index 0000000..6e3a786 Binary files /dev/null and b/.vs/Project2/v16/ipch/AutoPCH/18d67ed188651b3a/KNOXFUNCTIONS.ipch differ diff --git a/.vs/Project2/v16/ipch/AutoPCH/7aa84c9453a0bac0/PROJECT2.ipch b/.vs/Project2/v16/ipch/AutoPCH/7aa84c9453a0bac0/PROJECT2.ipch new file mode 100644 index 0000000..baa6fcc Binary files /dev/null and b/.vs/Project2/v16/ipch/AutoPCH/7aa84c9453a0bac0/PROJECT2.ipch differ diff --git a/.vs/Project2/v16/ipch/AutoPCH/7b43f03daa1023e2/PROJECT2.ipch b/.vs/Project2/v16/ipch/AutoPCH/7b43f03daa1023e2/PROJECT2.ipch new file mode 100644 index 0000000..6c4eade Binary files /dev/null and b/.vs/Project2/v16/ipch/AutoPCH/7b43f03daa1023e2/PROJECT2.ipch differ diff --git a/.vs/Project2/v16/ipch/AutoPCH/92593e019d2a2ca6/KNOXFUNCTIONS.ipch b/.vs/Project2/v16/ipch/AutoPCH/92593e019d2a2ca6/KNOXFUNCTIONS.ipch new file mode 100644 index 0000000..63646fb Binary files /dev/null and b/.vs/Project2/v16/ipch/AutoPCH/92593e019d2a2ca6/KNOXFUNCTIONS.ipch differ diff --git a/.vs/Project2/v16/ipch/AutoPCH/a471a0754d7a9194/KNOXFUNCTIONS.ipch b/.vs/Project2/v16/ipch/AutoPCH/a471a0754d7a9194/KNOXFUNCTIONS.ipch new file mode 100644 index 0000000..eb3a66c Binary files /dev/null and b/.vs/Project2/v16/ipch/AutoPCH/a471a0754d7a9194/KNOXFUNCTIONS.ipch differ diff --git a/.vs/ProjectSettings.json b/.vs/ProjectSettings.json new file mode 100644 index 0000000..0cf5ea5 --- /dev/null +++ b/.vs/ProjectSettings.json @@ -0,0 +1,3 @@ +{ + "CurrentProjectSetting": "No Configurations" +} \ No newline at end of file diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json new file mode 100644 index 0000000..019cc9e --- /dev/null +++ b/.vs/VSWorkspaceState.json @@ -0,0 +1,7 @@ +{ + "ExpandedNodes": [ + "" + ], + "SelectedNode": "\\Project2.sln", + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/.vs/cst116proj2-1-jacob-k-and-austin-g/v16/.suo b/.vs/cst116proj2-1-jacob-k-and-austin-g/v16/.suo new file mode 100644 index 0000000..4d8bb86 Binary files /dev/null and b/.vs/cst116proj2-1-jacob-k-and-austin-g/v16/.suo differ diff --git a/.vs/cst116proj2-1-jacob-k-and-austin-g/v16/Browse.VC.db b/.vs/cst116proj2-1-jacob-k-and-austin-g/v16/Browse.VC.db new file mode 100644 index 0000000..5ffae56 Binary files /dev/null and b/.vs/cst116proj2-1-jacob-k-and-austin-g/v16/Browse.VC.db differ diff --git a/.vs/cst116proj2-1-jacob-k-and-austin-g/v16/Browse.VC.db-shm b/.vs/cst116proj2-1-jacob-k-and-austin-g/v16/Browse.VC.db-shm new file mode 100644 index 0000000..090dce7 Binary files /dev/null and b/.vs/cst116proj2-1-jacob-k-and-austin-g/v16/Browse.VC.db-shm differ diff --git a/.vs/cst116proj2-1-jacob-k-and-austin-g/v16/Browse.VC.db-wal b/.vs/cst116proj2-1-jacob-k-and-austin-g/v16/Browse.VC.db-wal new file mode 100644 index 0000000..e69de29 diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite new file mode 100644 index 0000000..0df77f6 Binary files /dev/null and b/.vs/slnx.sqlite differ diff --git a/Debug/KnoxFunctions.obj b/Debug/KnoxFunctions.obj new file mode 100644 index 0000000..eb53b15 Binary files /dev/null and b/Debug/KnoxFunctions.obj differ diff --git a/Debug/Project2.exe b/Debug/Project2.exe new file mode 100644 index 0000000..935271f Binary files /dev/null and b/Debug/Project2.exe differ diff --git a/Debug/Project2.exe.recipe b/Debug/Project2.exe.recipe new file mode 100644 index 0000000..809ae68 --- /dev/null +++ b/Debug/Project2.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\jakno\Source\Repos\CST116\cst116proj2-1-jacob-k-and-austin-g\Debug\Project2.exe + + + + + + \ No newline at end of file diff --git a/Debug/Project2.ilk b/Debug/Project2.ilk new file mode 100644 index 0000000..9d522f8 Binary files /dev/null and b/Debug/Project2.ilk differ diff --git a/Debug/Project2.log b/Debug/Project2.log new file mode 100644 index 0000000..24e0bbc --- /dev/null +++ b/Debug/Project2.log @@ -0,0 +1,2 @@ + KnoxFunctions.cpp + Project2.vcxproj -> C:\Users\jakno\source\repos\CST116\Project2\Debug\Project2.exe diff --git a/Debug/Project2.obj b/Debug/Project2.obj new file mode 100644 index 0000000..6058ee4 Binary files /dev/null and b/Debug/Project2.obj differ diff --git a/Debug/Project2.pdb b/Debug/Project2.pdb new file mode 100644 index 0000000..96a2097 Binary files /dev/null and b/Debug/Project2.pdb differ diff --git a/Debug/Project2.tlog/CL.command.1.tlog b/Debug/Project2.tlog/CL.command.1.tlog new file mode 100644 index 0000000..81b0d5f Binary files /dev/null and b/Debug/Project2.tlog/CL.command.1.tlog differ diff --git a/Debug/Project2.tlog/CL.read.1.tlog b/Debug/Project2.tlog/CL.read.1.tlog new file mode 100644 index 0000000..077504b Binary files /dev/null and b/Debug/Project2.tlog/CL.read.1.tlog differ diff --git a/Debug/Project2.tlog/CL.write.1.tlog b/Debug/Project2.tlog/CL.write.1.tlog new file mode 100644 index 0000000..bd384f1 Binary files /dev/null and b/Debug/Project2.tlog/CL.write.1.tlog differ diff --git a/Debug/Project2.tlog/Project2.lastbuildstate b/Debug/Project2.tlog/Project2.lastbuildstate new file mode 100644 index 0000000..f75b7cd --- /dev/null +++ b/Debug/Project2.tlog/Project2.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:VCServicingVersionATL=14.29.30136:VCServicingVersionCrtHeaders=14.29.30136:VCServicingVersionCompilers=14.29.30136:TargetPlatformVersion=10.0.19041.0: +Debug|Win32|C:\Users\jakno\Source\Repos\CST116\cst116proj2-1-jacob-k-and-austin-g\| diff --git a/Debug/Project2.tlog/link.command.1.tlog b/Debug/Project2.tlog/link.command.1.tlog new file mode 100644 index 0000000..7213be9 Binary files /dev/null and b/Debug/Project2.tlog/link.command.1.tlog differ diff --git a/Debug/Project2.tlog/link.read.1.tlog b/Debug/Project2.tlog/link.read.1.tlog new file mode 100644 index 0000000..f8cae96 Binary files /dev/null and b/Debug/Project2.tlog/link.read.1.tlog differ diff --git a/Debug/Project2.tlog/link.write.1.tlog b/Debug/Project2.tlog/link.write.1.tlog new file mode 100644 index 0000000..e3c387c Binary files /dev/null and b/Debug/Project2.tlog/link.write.1.tlog differ diff --git a/Debug/Project2.vcxproj.FileListAbsolute.txt b/Debug/Project2.vcxproj.FileListAbsolute.txt new file mode 100644 index 0000000..ca03789 --- /dev/null +++ b/Debug/Project2.vcxproj.FileListAbsolute.txt @@ -0,0 +1,2 @@ +C:\Users\jakno\source\repos\CST116\Project2\Debug\Project2.exe +C:\Users\jakno\Source\Repos\CST116\cst116proj2-1-jacob-k-and-austin-g\Debug\Project2.exe diff --git a/Debug/vc142.idb b/Debug/vc142.idb new file mode 100644 index 0000000..f0a4aa4 Binary files /dev/null and b/Debug/vc142.idb differ diff --git a/Debug/vc142.pdb b/Debug/vc142.pdb new file mode 100644 index 0000000..90d9008 Binary files /dev/null and b/Debug/vc142.pdb differ diff --git a/KnoxFunctions.cpp b/KnoxFunctions.cpp new file mode 100644 index 0000000..c006e32 --- /dev/null +++ b/KnoxFunctions.cpp @@ -0,0 +1,98 @@ +// functions for the project written by Jacob Knox +// email Jacob.Knox@oit.edu + +#include "header.h" +#include +#include + +using namespace std; + +void DisplayMenu(int& choice) +{ + const string menu = + "\t\t\t--MENU--\n\n\ +\t 1. Is the value positive or negative\n\ +\t 2. Is the value odd or even\n\ +\t 3. How many digits does the value have\n\ +\t 4. See the digit at a specifed position\n\ +\t 5. Show additon table\n\ +\t 6. Show multiplication table\n\ +\t 7. Exit program\n\n"; + + cout << menu; + cout << "Input Menu Choice: "; + + cin >> choice; +} + +void ProcessMenuChocie(int chocie, int& value) +{ + int digits = 0; + switch (chocie) + { + case 1: + IsPosNeg(value); + break; + case 2: + case 3: + digits = FindNumDigits(value); + cout << value << " has " << digits << " digits.\n"; + break; + case 4: + case 5: + DisplayAdditonTable(); + break; + case 6: + case 7: + return; + default: + cout << "Unknown Menu Choice. Please input a number between 1 and 6"; + return; + } +} + +void IsPosNeg(int value) +{ + if (value == 0) + { + cout << value << " is not positive or negative.\n"; + } + else if (value < 0) + { + cout << value << " is negative.\n"; + } + else + { + cout << value << " is positve.\n"; + } +} + +int FindNumDigits(int value) +{ + int digits; + // truncated log of an int is the number of digits + digits = (int) log(value); + return digits; +} + +void DisplayAdditonTable() +{ + cout << "The addition table for numbers 0-12:\n"; + for (int i = 0; i <= 12; i++) + { + for (int j = 0; j <= 12; j++) + { + // if block makes it so numbers are spaced evenly + int sum = i + j; + if (sum >= 10) + { + cout << sum << " "; + } + else + { + cout << sum << " "; + } + } + cout << "\n"; + } +} diff --git a/KnoxPseudoCode.txt b/KnoxPseudoCode.txt new file mode 100644 index 0000000..27a62f8 --- /dev/null +++ b/KnoxPseudoCode.txt @@ -0,0 +1,25 @@ +pseudocode + +Displaymenu int& choice: + const string menu = string that contains the menu + output menu + input >> choice + +IsPosNeg int value: + if value == 0: + output neither + else if value < 0: + output negative + else: + output positive + +FindNumDigits int value: + int digits + digits = log(value) + output digits + +DisplayAdditionTable: + for i = 0; i <= 12; i++: + for j = 0; j <= 12 j++: + output i + j + output \n \ No newline at end of file diff --git a/Project2.cpp b/Project2.cpp new file mode 100644 index 0000000..80954a6 --- /dev/null +++ b/Project2.cpp @@ -0,0 +1,18 @@ +// Project2.cpp : This file contains the 'main' function. Program execution begins and ends there. +// Written by Jacob Knox +// + +#include +#include "header.h" + +using namespace std; + +int main() +{ + int num = 10, choice = 0; + while (choice != 7) + { + DisplayMenu(choice); + ProcessMenuChocie(choice, num); + } +} diff --git a/Project2.sln b/Project2.sln new file mode 100644 index 0000000..7b51c01 --- /dev/null +++ b/Project2.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31729.503 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Project2", "Project2.vcxproj", "{D021EE92-78BB-4481-A535-DD847C7881AE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D021EE92-78BB-4481-A535-DD847C7881AE}.Debug|x64.ActiveCfg = Debug|x64 + {D021EE92-78BB-4481-A535-DD847C7881AE}.Debug|x64.Build.0 = Debug|x64 + {D021EE92-78BB-4481-A535-DD847C7881AE}.Debug|x86.ActiveCfg = Debug|Win32 + {D021EE92-78BB-4481-A535-DD847C7881AE}.Debug|x86.Build.0 = Debug|Win32 + {D021EE92-78BB-4481-A535-DD847C7881AE}.Release|x64.ActiveCfg = Release|x64 + {D021EE92-78BB-4481-A535-DD847C7881AE}.Release|x64.Build.0 = Release|x64 + {D021EE92-78BB-4481-A535-DD847C7881AE}.Release|x86.ActiveCfg = Release|Win32 + {D021EE92-78BB-4481-A535-DD847C7881AE}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {E0D7CE13-0B4A-45EB-A4DC-0D37AC9AF524} + EndGlobalSection +EndGlobal diff --git a/Project2.vcxproj b/Project2.vcxproj new file mode 100644 index 0000000..cbe73a5 --- /dev/null +++ b/Project2.vcxproj @@ -0,0 +1,151 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {d021ee92-78bb-4481-a535-dd847c7881ae} + Project2 + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + \ No newline at end of file diff --git a/Project2.vcxproj.filters b/Project2.vcxproj.filters new file mode 100644 index 0000000..c7b7216 --- /dev/null +++ b/Project2.vcxproj.filters @@ -0,0 +1,30 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/Project2.vcxproj.user b/Project2.vcxproj.user new file mode 100644 index 0000000..5df420f --- /dev/null +++ b/Project2.vcxproj.user @@ -0,0 +1,6 @@ + + + + false + + \ No newline at end of file diff --git a/header.h b/header.h new file mode 100644 index 0000000..fa85f25 --- /dev/null +++ b/header.h @@ -0,0 +1,13 @@ +//Header for various functions + +#pragma once + +//double GetData(); +void DisplayMenu(int& choice); +void ProcessMenuChocie(int choice, int& value); +void IsPosNeg(int value); +//void IsOddEven(int value); +int FindNumDigits(int value); +//int FindDigitAtPosition(int value); +void DisplayAdditonTable(); +//void DisplayMultipicationTable(); \ No newline at end of file -- cgit v1.2.3