-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
99 lines (87 loc) · 2.54 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*
POLITEKNIK NEGERI BANDUNG
D4 Teknik Informatika - 1A
Developer :
- Muhammad Azhar Alauddin (201524013)
- Muhammad Fauzi Rizki Hamdalah (201524015)
- Rifatia Yumna Salma (201524024)
Program : Calculator Using Binary Tree
File : main.c
IDE : DevC++, VS Code
Compiler : GCC 4.9.2
-------------------------------------- */
#include "tree.h"
#include "tree.c"
#include "calculatorMain.c"
#include "history.c"
#include "Konversi/konversiSatuan.c"
#include "colorTheme.c"
#include "applicationUI.c"
int main(int argc, char** argv) {
// Show Splash Screen
showSplashScreen();
// Main Menu
menu:
mainMenu();
// Memilih mainMenu
int choice = 0;
scanf("%d", &choice);
while(true){
switch(choice){
case 1 :
calculator();
while(true){
fflush(stdin);
char input = getch();
if((int) input == KEYBOARD_ESCAPE) goto menu;
}
break;
case 2 :
help();
while(true){
fflush(stdin);
char input = getch();
if((int) input == KEYBOARD_TAB) goto menu;
}
break;
case 3 :
chooseColorTheme();
while(true){
fflush(stdin);
char input = getch();
if((int) input == KEYBOARD_ENTER) goto menu;
}
break;
case 4 :
readHistory();
while(true){
fflush(stdin);
char input = getch();
if((int) input == KEYBOARD_F1) goto menu;
}
break;
case 5 :
konversiSatuan();
while(true){
fflush(stdin);
char input = getch();
if((int) input == KEYBOARD_HOME) goto menu;
}
break;
case 6 :
credit();
while(true){
fflush(stdin);
char input = getch();
if((int) input == KEYBOARD_BACKSPACE) goto menu;
}
break;
case 7 :
exit(0);
break;
default :
goto menu;
}
}
return 0;
}