简单问题!asp 随机字母数字和符号

来源:百度知道 编辑:UC知道 时间:2024/06/02 23:42:38
我要得到类似这样的随机字母数字和符号:
121#%wdd789n%%&*e33@$13
%¥%%%67—jj%
*&hgsx%4v^4J^7h^&*

麻烦告诉给完整代码给我
我复制保存为asp文件后直接使用就可以了的那种

可参考这个
http://zhidao.baidu.com/question/42449187.html?fr=qrl

随机字母:
srand(time(NULL));
char ch = 'D' + rand()%21;

随机字母:
srand(time(NULL));
char ch = '0' + rand()%9;

随机符号:
srand(time(NULL));
int i = rand()%7 + 1;
char op = 0;
switch (0)
{
case 1:
op = '^';
break;
case 2:
op = '@';
break;
case 3:
op = '#';
break;
case 4:
op = '$';
break;
case 5:
op = '%';
break;
case 6:
op = '&';
break;
case 7:
op = '*';
break;
default:
break;
}