From 539537d9cdf4b42127eaabacd1e1e8572125cfdd Mon Sep 17 00:00:00 2001 From: Kevin Ludwig Date: Thu, 8 Feb 2024 18:44:52 +0100 Subject: [PATCH] Passwortgenerator angelegt --- src/passwortgenerator.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/passwortgenerator.c diff --git a/src/passwortgenerator.c b/src/passwortgenerator.c new file mode 100644 index 0000000..1a19863 --- /dev/null +++ b/src/passwortgenerator.c @@ -0,0 +1,18 @@ +#include +#include +#include + +int run_passwortGenerator(){ + printf("\nPasswort Generator\n\n"); + char zeichen[] = "abcdefghijklmnopqrstuvwxyz"; + int tmp = 0; + printf("\nIhr Passwort: "); + srand(time(0)); + for(int i = 0; i < 10; i++) + { + tmp = rand() % 26; + printf("%c", zeichen[tmp]); + } + printf("\n"); + return 0; +}