forked from akij17/Data-Structures-in-Pure-C
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
75 lines (70 loc) · 1.3 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#include <stdio.h>
#include "liststructures.h"
#include "stackQueue.h"
#include "graph.h"
#include "graph2.h"
#include "main_tree.h"
#include "heap.h"
void heapOptions();
void graphOptions();
int main() {
int ch;
while(1)
{
printf(
"\nWhat will you like to test?\n"
"1. Stack and Queues\n"
"2. List Structures\n"
"3. Binary Search Tree\n"
"4. Heap\n"
"5. Graphs\n"
"99. EXIT\n"
"Enter your Choice: "
);
scanf("%d", &ch);
switch(ch)
{
case 1:
stackQueue();
break;
case 2:
listMenu();
break;
case 3:
main_tree();
break;
case 4:
heapOptions();
break;
case 5:
graphOptions();
break;
case 99:
return 0;
}
}
}
void heapOptions(){
main_heap();
}
void graphOptions()
{
printf("\n"
"1. Graphs using lists\n"
"2. Graphs using matrix\n"
"99. Back to main menu\n"
);
int x; scanf("%d", &x);
switch(x){
case 1:
main_graph1();
break;
case 2:
main_graph2();
break;
case 99:
return;
default:
return;
}
}