summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/main.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/app/main.c b/app/main.c
new file mode 100644
index 0000000..dd93e39
--- /dev/null
+++ b/app/main.c
@@ -0,0 +1,25 @@
1#include "gatekeeper.h"
2#include <stdio.h>
3
4int main(void) {
5 char name[50];
6 char index[20];
7
8 printf("=== Embedded Gatekeeper ===\n");
9
10 printf("Enter name: ");
11 scanf("%49s", name);
12
13 printf("Enter index (6 digits): ");
14 scanf("%19s", index);
15
16 int result = register_student(name, index);
17
18 if (result == 0) {
19 printf("\nAccess granted.\n");
20 } else {
21 printf("\nAccess denied (error code %d).\n", result);
22 }
23
24 return 0;
25}