#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char a[100];
int s, e, v;
while (1){
printf("암호를 생성하시오: ");
scanf("%s", a);
s = e = v = 0;
for(int i = 0; i < strlen(a); i++){
if (a[i] >= '0' && a[i] <= '9'){
v = 1;
}
else if(a[i] >= 'A' && a[i] <= 'Z'){
e = 1;
}
else if(a[i] >= 'a' && a[i] <= 'z'){
s = 1;
}
}
if ((s == 1) && (e == 1) && (v == 1)){
printf("적정한 암호입니다.\n");
break;
}
else{
printf("숫자, 소문자, 대문자를 섞어서 암호를 다시 만드세요!\n");
}
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: