aboutsummaryrefslogtreecommitdiff
path: root/Project1/program.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Project1/program.cpp')
-rw-r--r--Project1/program.cpp37
1 files changed, 36 insertions, 1 deletions
diff --git a/Project1/program.cpp b/Project1/program.cpp
index c4f8036..d88e0ec 100644
--- a/Project1/program.cpp
+++ b/Project1/program.cpp
@@ -11,6 +11,41 @@ using std::endl;
int main()
{
-
+ int num = 0;
+ int q1 = 0;
+ int q2 = 0;
+
+ cout << "enter a number: ";
+
+ cin >> num;
+
+ switch (num)
+ {
+ case 1:
+ cout << "You are a great person\n";
+ break;
+ case 3:
+ cout << "You picked option: " << num << endl;
+ break;
+ case 55:
+ cout << "enter first number: ";
+ cin >> q1;
+ cout << "enter second number: ";
+ cin >> q2;
+ if (q2 == 0)
+ {
+ cout << "Cannot divide by zero";
+ break;
+ }
+ int q3;
+ q3 = q1 % q2;
+ cout << "the remainder of " << q1 << " divided by " << q2 << " is: " << q3;
+ break;
+
+ default:
+ cout << "Bad input! No switches to switch";
+ break;
+ }
+
return (0);
} \ No newline at end of file