From 651f060b5b839486eb08a3f77f0a5d5c38b6d950 Mon Sep 17 00:00:00 2001 From: Yana Blashchishina Date: Fri, 19 Jan 2024 00:09:40 -0800 Subject: exercise complete --- .../InClassExercise4/InClassExercise4.vcxproj | 37 ++++++------- .../InClassExercise4.vcxproj.filters | 5 ++ InClassExercise4/InClassExercise4/source.cpp | 60 ++++++++++++++++++++++ 3 files changed, 82 insertions(+), 20 deletions(-) diff --git a/InClassExercise4/InClassExercise4/InClassExercise4.vcxproj b/InClassExercise4/InClassExercise4/InClassExercise4.vcxproj index e739e3d..9ab2cca 100644 --- a/InClassExercise4/InClassExercise4/InClassExercise4.vcxproj +++ b/InClassExercise4/InClassExercise4/InClassExercise4.vcxproj @@ -17,7 +17,6 @@ Release x64 - 17.0 @@ -53,27 +52,24 @@ true Unicode - - + + + + + + + + + + + + + - - - - - - - - - - - - - - Level3 @@ -130,9 +126,10 @@ true - - + + + - + \ No newline at end of file diff --git a/InClassExercise4/InClassExercise4/InClassExercise4.vcxproj.filters b/InClassExercise4/InClassExercise4/InClassExercise4.vcxproj.filters index a8a6563..cb4ff3a 100644 --- a/InClassExercise4/InClassExercise4/InClassExercise4.vcxproj.filters +++ b/InClassExercise4/InClassExercise4/InClassExercise4.vcxproj.filters @@ -14,4 +14,9 @@ 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/InClassExercise4/InClassExercise4/source.cpp b/InClassExercise4/InClassExercise4/source.cpp index e69de29..8c41567 100644 --- a/InClassExercise4/InClassExercise4/source.cpp +++ b/InClassExercise4/InClassExercise4/source.cpp @@ -0,0 +1,60 @@ +// Name: Yana Blashchishina +// Date: 01/19/24 +//Class: CST116 +// Assignment: InClass Exercise 4 + +#include + + +using std::cout; +using std::cin; +using std::endl; + + +int main() +{ + cout << "Please input a number: "; + + int i = 0; + + cin >> i; + + switch (i) + { + case 100: + cout << "You are so amazing" << endl; + break; + + case 5: + cout << "You picked " << i << endl; + break; + case 21: + int j; + int k; + cout << "Input first number: "; + cin >> j; + cout << "Input second number: "; + cin >> k; + if (k == 0) + { + cout << "Cannot divive by zero" << endl; + break; + } + int g; + g = j% k; + cout << " The remainder of " << j << "divided by " << k << " is " << g << endl; + break; + + default: + cout << "Bad input, no switches to switch"; + break; + + + } + + + + + + return 0; +} \ No newline at end of file -- cgit v1.2.3