aboutsummaryrefslogtreecommitdiff
path: root/5b/Knox 7.4 1 exercises/Knox 7.4 1 exercises.cpp
blob: c02a5c75f13c979c6559c24a4d8a44dde687d7fa (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
// Knox 7.4 1 exercises.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>

using namespace std;

int main()
{
	int choice;
	bool run = true;

	while (run) {

		cout << "\t\tStudent Grade Program\n";
		cout << "\t\t\t-Main Menu-\n\n";
		cout << "\t1. Enter name\n";
		cout << "\t2. Enter test scores\n";
		cout << "\t3. Display test scores\n";
		cout << "\t9. Exit\n\n";
		cout << "Please enter you choice from the list above: ";

		cin >> choice;
		switch (choice) {
		case 1:
			cout << "You selected '1. Enter name'.";
			break;
		case 2:
			cout << "You selected '2. Enter test scores'.";
			break;
		case 3:
			cout << "You selected '3. Display test scores'.";
			break;
		case 9:
			cout << "You selected '9. Exit'.";
			run = false;
			break;
		default:
			cout << "Unknown choice: " << choice;
		}
	}
}