-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.c
More file actions
95 lines (90 loc) · 3.67 KB
/
main.c
File metadata and controls
95 lines (90 loc) · 3.67 KB
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
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
#include "list.h"
#include "queue.h"
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
void UIMenu(){
printf ("\t\t\t ____________________________________________________________________\n");
printf ("\t\t\t| |\n");
printf ("\t\t\t| LAYANAN APLIKASI DOKTER HEWAN |\n");
printf ("\t\t\t| _ _ _____ _ |\n");
printf ("\t\t\t| | | | | /%c / ____| | |\n",92);
printf ("\t\t\t| | |__| | __ ___ _____ / %c | | | |__ __ _ _ __ ___ ___ |\n",92);
printf ("\t\t\t| | __ |/ _` %c %c / / _ %c / /%c %c| | | '_ %c / _` | '_ %c / __/ _ %c |\n",92,92,92,92,92,92,92,92);
printf ("\t\t\t| | | | | (_| |%c V / __// ____ %c |____| | | | (_| | | | | (_| __/ |\n",92,92);
printf ("\t\t\t| |_| |_|%c__,_| %c_/ %c___/_/ %c_%c_____|_| |_|%c__,_|_| |_|%c___%c___| |\n",92,92,92,92,92,92,92,92);
printf ("\t\t\t| |\n");
printf ("\t\t\t| ================================================================ |\n");
printf ("\t\t\t| REGISTRASI ANTRIAN PROS. PELAYANAN KREDIT RIWAYAT |\n");
printf ("\t\t\t| (1) (2) (3) (4) (5) |\n");
printf ("\t\t\t| |\n");
printf ("\t\t\t| HEWAN DIPROSES EXIT |\n");
printf ("\t\t\t| (6) (7) |\n");
printf ("\t\t\t| |\n");
printf ("\t\t\t|____________________________________________________________________|\n");
printf ("\n\n\n\t\t\t\t Inputkan angka untuk memilih (1, 2, 3, 4, 5, 6 atau 7) : ");
}
void UIExit(){
printf("\t\t\t\t\t _____________________________\n");
printf("\t\t\t\t\t| TERIMA KASIH ! |\n");
printf("\t\t\t\t\t| SAMPAI JUMPA KEMBALI |\n");
printf("\t\t\t\t\t| ^_^ |\n");
printf("\t\t\t\t\t|_____________________________|\n");
}
void UIKredit(){
printf("\t\t\t\t\t\t _________________________________\n");
printf("\t\t\t\t\t\t| |\n");
printf("\t\t\t\t\t\t| Terima kasih telah berkunjung. |\n");
printf("\t\t\t\t\t\t| Semoga hewan anda sehat |\n");
printf("\t\t\t\t\t\t| selalu. |\n");
printf("\t\t\t\t\t\t| |\n");
printf("\t\t\t\t\t\t| -HaveAChance- |\n");
printf("\t\t\t\t\t\t|_________________________________|\n");
}
int main(int argc, char *argv[]) {
Queue Q;
CreateQueue(&Q);
int inputMenu;
do{
system("cls");
UIMenu();
scanf("%d", &inputMenu);
if (inputMenu == 1){
Registrasi (&Q);
system("pause");
}
else if (inputMenu == 2){
LihatDaftarAntrian(Q);
system("pause");
}
else if (inputMenu == 3){
ProsesAntrian(&Q);
system("pause");
}
else if (inputMenu == 4){
system("cls");
UIKredit();
system("pause");
}
else if (inputMenu == 5){
ReadData(Q);
system("pause");
}
else if (inputMenu == 6){
LihatProses(Q);
system("pause");
}else if (inputMenu == 7){
system("cls");
UIExit();
system("pause");
exit(0);
}
else{
printf("\n\n\t\t\t\t MAAF INPUT MENU SALAH! SILAHKAN COBA LAGI!\n");\
system("pause");
}
}while (inputMenu != 7);
return 0;
}