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
|
cst 116 Austin Guertin
11a 10.10 pg 282-283 #1 (submit code and runs)
#include <iostream>
using namespace::std;
int main()
{
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)
11c 10.15 pg 292-293 #1 (submit code and runs)
|