aboutsummaryrefslogtreecommitdiff
path: root/CST116F2021-Lab3/CST116F2021-Lab3.cpp
blob: 98f3d27fe9bb7cacd97e4ed7d91fe563d714ffbb (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
// CST116F2021-Lab3.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
using namespace std;


int main()
{  
	// p126 6.4 

//    int a = 0;
//    cout << a++ << endl;
//    cout << ++a << endl;
//    cout << a + 1 << endl;
//    cout << a << endl;
//    cout << --a << endl;


//// p126  6.5
//
//	int a = 10;
//	int b = 20;
//	int c = 30;
//
//	cout << a += 25 << endl;
//	cout << b *= (a * 2) << endl;
//	cout << b += 1 <<  endl;
//	cout << c %= 5 << endl;
//	cout << b /= a << endl;
//


//// p148 7.1 1 thru 4'
//
//	int int_exp1 = 0;
//	int int_exp2 = 1;
//	char char_exp = 'B';
//
//	int_exp1 >= int_exp2;  // put great than sign before = to correct it
//	int_exp1 == int_exp2;  // made it a == sign
//	int_exp1 != int_exp2;  // explamation should be before =
//	char_exp == 'A';  // should have single quote for char
//	int_exp1 > char_exp;  // trying to compare an int to a char
//	int_exp1 < 2 && int_exp1 > -10  // needs to nhave the variable in the second comparison
//

//  p155 7.2  bank level of membership program
	/*Pseudo - code for grading(p. 153) :

		Enter Student_Score
		IF Student_Score >= 90
		Display �A�
		Exit
		ELSE IF Student_Score >= 80
		Display �B�
		Exit
		ELSE IF Student_Score >= 70
		Display �C�
		Exit
		ELSE IF Student_Score >= 60
		Display �D�

		?Exit
		Display �E�*/





	// p161  7.4 #1   case statement
		short choice;

		cout << "\t    Student Grade Program\n";
		cout << "\t\t -Main Menu-\n\n";
		cout << "\t1. Enter name\n";
		cout << "\t2. Enter test scores\n";
		cout << "\t3. Display test scores\n";
		cout << "\t4. Exit\n\n";
		cout << "Please enter your choice from the list above:   ";
		cin >> choice;

		switch (choice)
		{
			case 1:
				cout << "Enter name"<< endl;
				break;
			case 2:
				cout << "Enter test scores" << endl;
				break;
			case 3:
				cout << "Display test scores" << endl;
				break;
			case 4:
				cout << "Exit" << endl;
				break;
			default:
				cout << "Invalid Choice" << endl;


				return 0;

	}





	





}