|
|
@ -1,17 +1,20 @@ |
|
|
|
#include <stdio.h> |
|
|
|
#include <stdlib.h> |
|
|
|
#include <time.h> |
|
|
|
#include <ctype.h> |
|
|
|
|
|
|
|
int run_passwortGenerator(){ |
|
|
|
printf("\nPasswort Generator\n\n"); |
|
|
|
char zeichen[] = "abcdefghijklmnopqrstuvwxyz"; |
|
|
|
int tmp = 0; |
|
|
|
int GroSSklein = 0; |
|
|
|
printf("\nIhr Passwort: "); |
|
|
|
srand(time(0)); |
|
|
|
for(int i = 0; i < 10; i++) |
|
|
|
{ |
|
|
|
tmp = rand()%26; |
|
|
|
printf("%c", zeichen[tmp]); |
|
|
|
GroSSklein = rand()%2; |
|
|
|
printf("%c", (GroSSklein==0?toupper(zeichen[tmp]):zeichen[tmp])); |
|
|
|
} |
|
|
|
printf("\n"); |
|
|
|
return 0; |
|
|
|