#include #include #include #include int run_passwortGenerator(){ printf("\nPasswort Generator\n\n"); char zeichen[] = "abcdefghijklmnopqrstuvwxyz0123456789!%&/()=?*#"; while(1){ int eing = 0; 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 < eing; i++) { tmp = rand()%46; GroSSklein = rand()%2; printf("%c", (tmp<26?(GroSSklein==0?toupper(zeichen[tmp]):zeichen[tmp]):zeichen[tmp])); } printf("\n");} return 0; }