-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
39 lines (32 loc) · 936 Bytes
/
main.c
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
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include "Input.h"
#include "Queue.h"
#include "File.h"
#include "main_functions.h"
int main()
{
QUEUE que_std; create(&que_std);
QUEUE que_pre; create(&que_pre);
bool nextQue = false; // true -> The next queue where the client will be attended will be the standard one.
// false -> The next queue where the client will be attended will be the premium one.
int clientNumber = 1;
char option = '1';
while (option != '5') {
printMenu(&option);
if (option == '1') {
newClient(&que_std, &que_pre, &clientNumber);
} else if (option == '2') {
attendClient(&que_std, &que_pre, &nextQue);
} else if (option == '3') {
printQueues(que_std, que_pre);
} else if (option == '4') {
showSpecificClientInfo(que_std, que_pre);
}
}
freeQueue(&que_std);
freeQueue(&que_pre);
return 0;
}