aboutsummaryrefslogtreecommitdiff
path: root/In Class Ex 4/Project1/EX4.cpp
blob: 7ab574a1fa377d9225fbd8e2b33d18b8371984ce (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
52
53
54
// Name: Nataliia Brown
// Date: 1/13/24
// Class: CST 116
// Assignment: InClass Exercise 4

#include <iostream>


using std::cout;
using std::cin;
using std::endl;

int main()
{

	int i;
	cout << "please input a number: " << endl;

	cin >> i;

	switch (i)
	{
	case 100: 
		cout << "You are a great person" << endl;
		break;
	case 5:
		cout << "You picked option : " << i << endl;
		break;
	case 21:
		int j;
		int k;
		cout << "please input number 1: ";
		cin >> j;
		cout << "please input number 2: ";
		cin >> k;
		if (k == 0)
		{
			cout << "cannot divide by zero" << endl;
			break;
		}
		int g;
		g = j % k;
		cout << "the remainder of " << j << "devided by " << k << " is " << g << endl;
		break;

	default:
		cout << "Bad input, no switches to switch";
		break;
	}


	return 0;
}