diff options
| author | Filip Wandzio <contact@philw.dev> | 2026-03-01 01:03:39 +0100 |
|---|---|---|
| committer | Filip Wandzio <contact@philw.dev> | 2026-03-01 01:03:39 +0100 |
| commit | bf0d77d7d448e964e9716d5af67c48f3d014f090 (patch) | |
| tree | e55f1e91a8c20cd737dfb01dc12a954c25711e01 /app/main.c | |
| download | embedded_guardian-bf0d77d7d448e964e9716d5af67c48f3d014f090.tar.gz embedded_guardian-bf0d77d7d448e964e9716d5af67c48f3d014f090.zip | |
Scaffold basic project tree, implement benchmarking logic
Implement unit testing guardian
Diffstat (limited to 'app/main.c')
| -rw-r--r-- | app/main.c | 25 |
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 | |||
| 4 | int 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 | } | ||
