aboutsummaryrefslogtreecommitdiff
path: root/CST116F2021-Lab6/CST116F2021-Lab6.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CST116F2021-Lab6/CST116F2021-Lab6.cpp')
-rw-r--r--CST116F2021-Lab6/CST116F2021-Lab6.cpp52
1 files changed, 40 insertions, 12 deletions
diff --git a/CST116F2021-Lab6/CST116F2021-Lab6.cpp b/CST116F2021-Lab6/CST116F2021-Lab6.cpp
index 466d90f..4ec4360 100644
--- a/CST116F2021-Lab6/CST116F2021-Lab6.cpp
+++ b/CST116F2021-Lab6/CST116F2021-Lab6.cpp
@@ -1,20 +1,48 @@
-// CST116F2021-Lab6.cpp : This file contains the 'main' function. Program execution begins and ends there.
-//
+cst 116 Austin Guertin
+11a 10.10 pg 282-283 #1 (submit code and runs)
+
#include <iostream>
+using namespace::std;
+
int main()
{
- std::cout << "Hello World!\n";
+ int Choice;
+ int Dollars;
+
+ int id[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
+ string Student_Club[10] = { "Computer Systems Society", "Society of Women Engineers", "Sigma Tu Gamma", "Trekkies", "Home Brewers", "High Altitude Ballooning", "Rugby", "IEEE", "International Club", "Dance Club" };
+ string President[10] = { "Kim Cares", "Jennie Queen", "Storm Drain", "C. Kirk", "Ross Coe", "Justin Time", "Ryan Johns", "Marc Bansmere", "Kong Mbonkum", "Will Shaver" };
+ int Students[10] = { 49, 51, 241, 230, 15, 19, 25, 36, 102, 64 };
+
+ for (int i = 0; i < 10; i++)
+ {
+ cout << "\n-----Club #" << i + 1 << "-----\n";
+ cout << "\nStudent Club: " << Student_Club[i] << "\nPresident: " << President[i] << "\nAmount of students: " << Students[i] << "\n";
+ }
+
+ cout << "\n------------------------------------------------------------------------------------------\n";
+
+ cout << "\n\nOut of all of the students clubs, which one of the would you like to select:\n\n#";
+ cin >> Choice;
+
+ if (Choice > 10 || Choice < 1)
+ {
+ cout << "\n\n\nYou have inputted an incorrect number, rerun the program.\n\n\n\n";
+ return 0;
+ }
+
+ cout << "\nYou want to choose club #" << Choice << "? So that is:\n";
+ cout << "\nStudent Club: " << Student_Club[Choice - 1] << "\nPresident: " << President[Choice - 1] << "\nAmount of students: " << Students[Choice - 1] << "\n";
+
+ Dollars = Students[Choice - 1] * 75;
+
+ cout << "\nAnd since the club receives $75 for each student in the club, and there are " << Students[Choice - 1] << " students, \nand the club number is #" << Choice << ", or the club of " << Student_Club[Choice - 1] << ", it will receive $" << Dollars << "\n\n\n\n";
}
+
+11b 10.14 pg 289-292 #1 (submit code and runs)
+
-// 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
+11c 10.15 pg 292-293 #1 (submit code and runs)