From 5b5d20527caa9ec933b3b0d4d296e7156a5c138e Mon Sep 17 00:00:00 2001 From: JacobAKnox <91796123+JacobAKnox@users.noreply.github.com> Date: Wed, 13 Oct 2021 18:53:02 -0700 Subject: 5a complete --- 5a/6.4 Exercies 1.txt | 6 + 5a/7.1 Exercises.txt | 9 ++ 5a/7.2 run.txt | 9 ++ 5a/Knox7.1Exercises/Knox7.1Exercises.cpp | 33 +++++ 5a/Knox7.1Exercises/Knox7.1Exercises.sln | 31 +++++ 5a/Knox7.1Exercises/Knox7.1Exercises.vcxproj | 147 +++++++++++++++++++++ .../Knox7.1Exercises.vcxproj.filters | 22 +++ CST116F2021-Lab3.sln | 31 ----- CST116F2021-Lab3/CST116F2021-Lab3.sln | 31 +++++ 9 files changed, 288 insertions(+), 31 deletions(-) create mode 100644 5a/6.4 Exercies 1.txt create mode 100644 5a/7.1 Exercises.txt create mode 100644 5a/7.2 run.txt create mode 100644 5a/Knox7.1Exercises/Knox7.1Exercises.cpp create mode 100644 5a/Knox7.1Exercises/Knox7.1Exercises.sln create mode 100644 5a/Knox7.1Exercises/Knox7.1Exercises.vcxproj create mode 100644 5a/Knox7.1Exercises/Knox7.1Exercises.vcxproj.filters delete mode 100644 CST116F2021-Lab3.sln create mode 100644 CST116F2021-Lab3/CST116F2021-Lab3.sln diff --git a/5a/6.4 Exercies 1.txt b/5a/6.4 Exercies 1.txt new file mode 100644 index 0000000..83afd45 --- /dev/null +++ b/5a/6.4 Exercies 1.txt @@ -0,0 +1,6 @@ +output: +0 +2 +3 +3 +2 \ No newline at end of file diff --git a/5a/7.1 Exercises.txt b/5a/7.1 Exercises.txt new file mode 100644 index 0000000..3a8699d --- /dev/null +++ b/5a/7.1 Exercises.txt @@ -0,0 +1,9 @@ +int int_exp1 = 0, int_exp2 = 1; +char char_exp = 'B'; + +1. int_exp1 => int_exp2 it sould be >= not => +2. int_exp1 = int_exp2 = is assignment not comparision +3. int_exp1 =! int_exp2 =! should be != +4. char_exp == "A" is comparing a string and char +5. int_exp1 > char_exp is comparing an int and char +6. int_exp1 < 2 && > -10 you cannot combine && and > in this manner to make an additional comparision \ No newline at end of file diff --git a/5a/7.2 run.txt b/5a/7.2 run.txt new file mode 100644 index 0000000..80a90ea --- /dev/null +++ b/5a/7.2 run.txt @@ -0,0 +1,9 @@ +Output: + +Please input your total account balance in dollars: 5000 + +Please input the number of accounts you have: 3842 + +Your membership type is Copper. +C:\Users\jakno\source\repos\cst116-lab3-JacobAKnox\5a\Knox7.1Exercises\Debug\Knox7.1Exercises.exe (process 12420) exited with code 0. +Press any key to close this window . . . diff --git a/5a/Knox7.1Exercises/Knox7.1Exercises.cpp b/5a/Knox7.1Exercises/Knox7.1Exercises.cpp new file mode 100644 index 0000000..e158a51 --- /dev/null +++ b/5a/Knox7.1Exercises/Knox7.1Exercises.cpp @@ -0,0 +1,33 @@ +// Knox7.1Exercises.cpp : This file contains the 'main' function. Program execution begins and ends there. +// + +#include +using namespace std; + +int main() +{ + int accounts; + double balance; + + cout << "Please input your total account balance in dollars: "; + cin >> balance; + + cout << "\nPlease input the number of accounts you have: "; + cin >> accounts; + + if (balance >= 25000) { + cout << "\nYour membership type is Platinum."; + } + else if (balance >= 10000) { + if (accounts >= 2) { + cout << "\nYour membership type is Gold."; + } + else { + cout << "\nYour membership type is Silver."; + } + } + else { + cout << "\nYour membership type is Copper."; + } + return 0; +} \ No newline at end of file diff --git a/5a/Knox7.1Exercises/Knox7.1Exercises.sln b/5a/Knox7.1Exercises/Knox7.1Exercises.sln new file mode 100644 index 0000000..f34ee50 --- /dev/null +++ b/5a/Knox7.1Exercises/Knox7.1Exercises.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31727.386 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Knox7.1Exercises", "Knox7.1Exercises.vcxproj", "{9587E91E-E931-4F1E-824A-CD36076AB4B8}" +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 + {9587E91E-E931-4F1E-824A-CD36076AB4B8}.Debug|x64.ActiveCfg = Debug|x64 + {9587E91E-E931-4F1E-824A-CD36076AB4B8}.Debug|x64.Build.0 = Debug|x64 + {9587E91E-E931-4F1E-824A-CD36076AB4B8}.Debug|x86.ActiveCfg = Debug|Win32 + {9587E91E-E931-4F1E-824A-CD36076AB4B8}.Debug|x86.Build.0 = Debug|Win32 + {9587E91E-E931-4F1E-824A-CD36076AB4B8}.Release|x64.ActiveCfg = Release|x64 + {9587E91E-E931-4F1E-824A-CD36076AB4B8}.Release|x64.Build.0 = Release|x64 + {9587E91E-E931-4F1E-824A-CD36076AB4B8}.Release|x86.ActiveCfg = Release|Win32 + {9587E91E-E931-4F1E-824A-CD36076AB4B8}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {E7C936ED-9B9F-45E1-A5DA-159D195DD847} + EndGlobalSection +EndGlobal diff --git a/5a/Knox7.1Exercises/Knox7.1Exercises.vcxproj b/5a/Knox7.1Exercises/Knox7.1Exercises.vcxproj new file mode 100644 index 0000000..9b1ea49 --- /dev/null +++ b/5a/Knox7.1Exercises/Knox7.1Exercises.vcxproj @@ -0,0 +1,147 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {9587e91e-e931-4f1e-824a-cd36076ab4b8} + Knox71Exercises + 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/5a/Knox7.1Exercises/Knox7.1Exercises.vcxproj.filters b/5a/Knox7.1Exercises/Knox7.1Exercises.vcxproj.filters new file mode 100644 index 0000000..babcbb5 --- /dev/null +++ b/5a/Knox7.1Exercises/Knox7.1Exercises.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {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 + + + \ No newline at end of file diff --git a/CST116F2021-Lab3.sln b/CST116F2021-Lab3.sln deleted file mode 100644 index 346b5fd..0000000 --- a/CST116F2021-Lab3.sln +++ /dev/null @@ -1,31 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31424.327 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CST116F2021-Lab3", "CST116F2021-Lab3\CST116F2021-Lab3.vcxproj", "{00A9D643-BD80-4D4E-8CEA-64711FD96DAC}" -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 - {00A9D643-BD80-4D4E-8CEA-64711FD96DAC}.Debug|x64.ActiveCfg = Debug|x64 - {00A9D643-BD80-4D4E-8CEA-64711FD96DAC}.Debug|x64.Build.0 = Debug|x64 - {00A9D643-BD80-4D4E-8CEA-64711FD96DAC}.Debug|x86.ActiveCfg = Debug|Win32 - {00A9D643-BD80-4D4E-8CEA-64711FD96DAC}.Debug|x86.Build.0 = Debug|Win32 - {00A9D643-BD80-4D4E-8CEA-64711FD96DAC}.Release|x64.ActiveCfg = Release|x64 - {00A9D643-BD80-4D4E-8CEA-64711FD96DAC}.Release|x64.Build.0 = Release|x64 - {00A9D643-BD80-4D4E-8CEA-64711FD96DAC}.Release|x86.ActiveCfg = Release|Win32 - {00A9D643-BD80-4D4E-8CEA-64711FD96DAC}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {E9EEF905-246F-4906-9C1F-8DE00CEB16AD} - EndGlobalSection -EndGlobal diff --git a/CST116F2021-Lab3/CST116F2021-Lab3.sln b/CST116F2021-Lab3/CST116F2021-Lab3.sln new file mode 100644 index 0000000..346b5fd --- /dev/null +++ b/CST116F2021-Lab3/CST116F2021-Lab3.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31424.327 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CST116F2021-Lab3", "CST116F2021-Lab3\CST116F2021-Lab3.vcxproj", "{00A9D643-BD80-4D4E-8CEA-64711FD96DAC}" +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 + {00A9D643-BD80-4D4E-8CEA-64711FD96DAC}.Debug|x64.ActiveCfg = Debug|x64 + {00A9D643-BD80-4D4E-8CEA-64711FD96DAC}.Debug|x64.Build.0 = Debug|x64 + {00A9D643-BD80-4D4E-8CEA-64711FD96DAC}.Debug|x86.ActiveCfg = Debug|Win32 + {00A9D643-BD80-4D4E-8CEA-64711FD96DAC}.Debug|x86.Build.0 = Debug|Win32 + {00A9D643-BD80-4D4E-8CEA-64711FD96DAC}.Release|x64.ActiveCfg = Release|x64 + {00A9D643-BD80-4D4E-8CEA-64711FD96DAC}.Release|x64.Build.0 = Release|x64 + {00A9D643-BD80-4D4E-8CEA-64711FD96DAC}.Release|x86.ActiveCfg = Release|Win32 + {00A9D643-BD80-4D4E-8CEA-64711FD96DAC}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {E9EEF905-246F-4906-9C1F-8DE00CEB16AD} + EndGlobalSection +EndGlobal -- cgit v1.2.3