aboutsummaryrefslogtreecommitdiff
path: root/CST116F2021-Lab3/CST116F2021-Lab3.cpp
diff options
context:
space:
mode:
authorBenjamin Schroeder <[email protected]>2021-10-13 15:36:02 -0700
committerBenjamin Schroeder <[email protected]>2021-10-13 15:36:02 -0700
commit849f0d176151ce7fc9de3c8ccde7336162b50240 (patch)
tree5d673d676b75d26e924790a2b85cb0c3072f9a64 /CST116F2021-Lab3/CST116F2021-Lab3.cpp
parentAdd online IDE url (diff)
downloadcst116-lab3-bensprogramma-849f0d176151ce7fc9de3c8ccde7336162b50240.tar.xz
cst116-lab3-bensprogramma-849f0d176151ce7fc9de3c8ccde7336162b50240.zip
CST116_Lab3_Schroeder
Diffstat (limited to 'CST116F2021-Lab3/CST116F2021-Lab3.cpp')
-rw-r--r--CST116F2021-Lab3/CST116F2021-Lab3.cpp119
1 files changed, 107 insertions, 12 deletions
diff --git a/CST116F2021-Lab3/CST116F2021-Lab3.cpp b/CST116F2021-Lab3/CST116F2021-Lab3.cpp
index 41af613..98f3d27 100644
--- a/CST116F2021-Lab3/CST116F2021-Lab3.cpp
+++ b/CST116F2021-Lab3/CST116F2021-Lab3.cpp
@@ -2,19 +2,114 @@
//
#include <iostream>
+using namespace std;
+
int main()
-{
- std::cout << "Hello World!\n";
-}
+{
+ // 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�*/
+
+
-// Run program: Ctrl + F5 or Debug > Start Without Debugging menu
-// Debug program: F5 or Debug > Start Debugging menu
-// Tips for Getting Started:
-// 1. Use the Solution Explorer window to add/manage files
-// 2. Use the Team Explorer window to connect to source control
-// 3. Use the Output window to see build output and other messages
-// 4. Use the Error List window to view errors
-// 5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
-// 6. In the future, to open this project again, go to File > Open > Project and select the .sln file
+
+ // 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;
+
+ }
+
+
+
+
+
+
+
+
+
+
+
+}