aboutsummaryrefslogtreecommitdiff
path: root/Project1/program.cpp
blob: d88e0ecafdb35e0c0b64b5c931ce92f2acc36952 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Name: Austin Lujan
// Date: 1/16
// Class: CST 116
// Lecture

#include <iostream>

using std::cout;
using std::cin;
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);
}