aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacobAKnox <[email protected]>2021-10-13 18:53:02 -0700
committerJacobAKnox <[email protected]>2021-10-13 18:53:02 -0700
commit5b5d20527caa9ec933b3b0d4d296e7156a5c138e (patch)
tree6c3723cd032374c0c784949768ae749195b8d970
parentAdd online IDE url (diff)
downloadcst116-lab3-jacobaknox-5b5d20527caa9ec933b3b0d4d296e7156a5c138e.tar.xz
cst116-lab3-jacobaknox-5b5d20527caa9ec933b3b0d4d296e7156a5c138e.zip
5a complete
-rw-r--r--5a/6.4 Exercies 1.txt6
-rw-r--r--5a/7.1 Exercises.txt9
-rw-r--r--5a/7.2 run.txt9
-rw-r--r--5a/Knox7.1Exercises/Knox7.1Exercises.cpp33
-rw-r--r--5a/Knox7.1Exercises/Knox7.1Exercises.sln31
-rw-r--r--5a/Knox7.1Exercises/Knox7.1Exercises.vcxproj147
-rw-r--r--5a/Knox7.1Exercises/Knox7.1Exercises.vcxproj.filters22
-rw-r--r--CST116F2021-Lab3/CST116F2021-Lab3.sln (renamed from CST116F2021-Lab3.sln)0
8 files changed, 257 insertions, 0 deletions
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 <iostream>
+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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <VCProjectVersion>16.0</VCProjectVersion>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectGuid>{9587e91e-e931-4f1e-824a-cd36076ab4b8}</ProjectGuid>
+ <RootNamespace>Knox71Exercises</RootNamespace>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v142</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v142</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v142</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v142</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="Shared">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <SDLCheck>true</SDLCheck>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ConformanceMode>true</ConformanceMode>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ConformanceMode>true</ConformanceMode>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <SDLCheck>true</SDLCheck>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ConformanceMode>true</ConformanceMode>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ConformanceMode>true</ConformanceMode>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="Knox7.1Exercises.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="Knox7.1Exercises.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/CST116F2021-Lab3.sln b/CST116F2021-Lab3/CST116F2021-Lab3.sln
index 346b5fd..346b5fd 100644
--- a/CST116F2021-Lab3.sln
+++ b/CST116F2021-Lab3/CST116F2021-Lab3.sln