From 3b114c34920b3eb4b56143d432f8bee3ec9b89e6 Mon Sep 17 00:00:00 2001 From: Asahel Date: Fri, 1 Mar 2024 09:28:56 -0800 Subject: Added files --- Homework6/program.cpp | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Homework6/program.cpp (limited to 'Homework6/program.cpp') diff --git a/Homework6/program.cpp b/Homework6/program.cpp new file mode 100644 index 0000000..c08993f --- /dev/null +++ b/Homework6/program.cpp @@ -0,0 +1,50 @@ +// Name: Asahel Lopez +// Date: 2/11/24 +// Class: CST 116 +// Assignment: Homework 5 + +#include +#include +#include "Contacts.h" + +using std::cout; +using std::cin; +using std::endl; + +int main() +{ + const int MAX = 10; + + Contact contacts[MAX] = {}; + int numberOfContacts = 0; + + char c = 'n'; + + do { + system("cls"); + cout << "1. Add New Contact\n"; + cout << "2. Update Contact\n"; + cout << "3. Print Contacts\n"; + cout << "Press 'x' to Exit\n\n"; + std::cin >> c; + switch (c) + { + case '1': + contacts[numberOfContacts++] = InputNewContact(); + break; + case '2': + + + break; + case '3': + break; + case 'x': + break; + default: + cout << "\nInvalid\n"; + } + + } while (c != 'x'); + + return 0; +} \ No newline at end of file -- cgit v1.2.3