From 788ce6a605a23430c974bb6460bdb95a224443d0 Mon Sep 17 00:00:00 2001 From: Kevin Ludwig Date: Thu, 8 Feb 2024 19:25:50 +0100 Subject: [PATCH] =?UTF-8?q?Passwortgenerator=20l=C3=A4nge=20selbst=20w?= =?UTF-8?q?=C3=A4hlen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/passwortgenerator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/passwortgenerator.c b/src/passwortgenerator.c index c9f1189..715c128 100644 --- a/src/passwortgenerator.c +++ b/src/passwortgenerator.c @@ -8,14 +8,14 @@ int run_passwortGenerator(){ char zeichen[] = "abcdefghijklmnopqrstuvwxyz0123456789!%&/()=?*#"; while(1){ int eing = 0; - printf("Tippen Sie '1' ein, um ein neues Passwort zu generieren\noder '0' um das Programm zu beenden: "); + printf("Tippen Sie die gewuenschte Passwortlaenge ein, um ein neues zu generieren\noder '0' um das Programm zu beenden: "); scanf("%d", &eing); int tmp = 0; int GroSSklein = 0; if(eing == 0){return 0;} printf("\nIhr Passwort: "); srand(time(0)); - for(int i = 0; i < 10; i++) + for(int i = 0; i < eing; i++) { tmp = rand()%46; GroSSklein = rand()%2;