diff options
| author | raquelc <[email protected]> | 2024-01-22 11:40:32 -0800 |
|---|---|---|
| committer | raquelc <[email protected]> | 2024-01-22 11:40:32 -0800 |
| commit | 279a0263b71102359deb5b61c1743b2406afd2fb (patch) | |
| tree | e3347bab5784a518b9932badf0c6f4ae2d995513 /In-class-excercise4 | |
| parent | init (diff) | |
| download | in-class-exercise-4-raquel191-develop.tar.xz in-class-exercise-4-raquel191-develop.zip | |
exercise completedevelop
Diffstat (limited to 'In-class-excercise4')
3 files changed, 78 insertions, 20 deletions
diff --git a/In-class-excercise4/In-class-excercise4/In-class-excercise4.vcxproj b/In-class-excercise4/In-class-excercise4/In-class-excercise4.vcxproj index 66e3a5b..3ddcaa7 100644 --- a/In-class-excercise4/In-class-excercise4/In-class-excercise4.vcxproj +++ b/In-class-excercise4/In-class-excercise4/In-class-excercise4.vcxproj @@ -17,7 +17,6 @@ <Configuration>Release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> - </ItemGroup> <PropertyGroup Label="Globals"> <VCProjectVersion>17.0</VCProjectVersion> @@ -53,27 +52,24 @@ <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> </ImportGroup> - <ImportGroup Label="Shared" > + <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> - <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" /> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <WarningLevel>Level3</WarningLevel> @@ -130,9 +126,10 @@ <GenerateDebugInformation>true</GenerateDebugInformation> </Link> </ItemDefinitionGroup> - - <ItemGroup></ItemGroup> + <ItemGroup> + <ClCompile Include="Source.cpp" /> + </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> -</Project> +</Project>
\ No newline at end of file diff --git a/In-class-excercise4/In-class-excercise4/In-class-excercise4.vcxproj.filters b/In-class-excercise4/In-class-excercise4/In-class-excercise4.vcxproj.filters index a8a6563..3e7e62e 100644 --- a/In-class-excercise4/In-class-excercise4/In-class-excercise4.vcxproj.filters +++ b/In-class-excercise4/In-class-excercise4/In-class-excercise4.vcxproj.filters @@ -14,4 +14,9 @@ <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="Source.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> </Project>
\ No newline at end of file diff --git a/In-class-excercise4/In-class-excercise4/Source.cpp b/In-class-excercise4/In-class-excercise4/Source.cpp index e69de29..d0f484b 100644 --- a/In-class-excercise4/In-class-excercise4/Source.cpp +++ b/In-class-excercise4/In-class-excercise4/Source.cpp @@ -0,0 +1,56 @@ +// name: Raquel Chavez +// Date: 1/20/24 +//Class: Cst 116 +// Assignment: In class extercise 4 + +#include <iostream> + +using std::cout; +using std::cin; +using std::endl; + +int main() +{ + cout << "please input a number: "; + + int i = 0; + + cin >> i; + + switch (i) + { + case 1: + cout << "You are a friendly person" << endl; + break; + + case 2: + cout << "you picked option: "<< i << endl; + break; + + case 3: + int n; + int m; + + cout << "please input a whole number: "; + cin >> n; + + cout << "please input another whole number: "; + cin >> m; + + if (m == 0) + { + cout << "cannnot divide by zero" << endl; + break; + } + int g; + g = n % m; + cout << "The remainder of " << n << " divided by " << m << " is " << g << endl; + break; + + default: + cout << "Bad input, no switches to switch"; + break; + } + + return 0; +}
\ No newline at end of file |