Rachael Oke / Mbed 2 deprecated lab6

Dependencies:   mbed

main.cpp

Committer:
rachaeloke
Date:
2021-03-21
Revision:
0:3381c1b60c1b

File content as of revision 0:3381c1b60c1b:

#include <iostream>

using namespace std;
int DisplayMenuGetChoice();
void GoblinSickDays();
void DisplaySomethingCool();


int main ()
{
    int option;
    do{
    
    option = DisplayMenuGetChoice();
    switch(option)
    {
        case 1:
        GoblinSickDays();
        break;
        case 2:
        DisplaySomethingCool();
        break;
        case 3:
        return 0;
        break;
        default:
        cout << "invalid option, choose from option 1 - 3" << endl;
    }
   
   
    }while(option !=3);
    
    
    
    
}

int DisplayMenuGetChoice()
{
    cout << "1- enter Goblin Sick Days" << endl; 
    cout << "2- enter Display Something Cool" << endl;
    cout << "3- enter End The Program" << endl;
    int option;
    cin >> option;
    return option;
}

void DisplaySomethingCool()
{
 cout << "_______  _______  _______           _______  _______  _  " << endl;    
 cout << "(  ____ )(  ___  )(  ____ \|\     /|(  ___  )(  ____ \( \ " << endl;     
 cout << "| (    )|| (   ) || (    \/| )   ( || (   ) || (    \/| (  " << endl;      
 cout << "| (____)|| (___) || |      | (___) || (___) || (__    | |  " << endl;      
 cout << "|     __)|  ___  || |      |  ___  ||  ___  ||  __)   | |    " << endl;    
 cout << "| (\ (   | (   ) || |      | (   ) || (   ) || (      | |      " << endl;  
 cout << "| ) \ \__| )   ( || (____/\| )   ( || )   ( || (____/\| (____/\ " << endl; 
 cout << "|/   \__/|/     \|(_______/|/     \||/     \|(_______/(_______/ " << endl; 
                                                 
}

void GoblinSickDays()
{
    int num_tellers = 0;
    int teller;
    cout << "How many Goblins worked at Gringotts during each of the last 3 years?" << endl;
    cin >> teller;
    
    for(int i = 0; i < num_tellers; i++)
    {
        for(int x = 0; x < 3; x++)
        {
        int num;
        cout << "how many days was Goblin out for during year 1?" << i << " and year " << x << endl;
        cin >> num;
        num_tellers += num;
        }
    }
    
}