#include <stdio.h>
#include <stdlib.h>
#include<time.h>
#include <locale.h>
void main() //随机起名器
{
setlocale(LC_ALL, "zh-CN");
wchar_t str[8] = { L'龙', L'虎', L'大', L'伟', L'天', L'桂', L'三', L'财' };
//putwchar(str[0]);
time_t times;
srand((unsigned int)time(×));//取随机数种子
int length = rand() % 2 +1;//6-15
putwchar(L'吴'); for (int i = 0; i < length; i++)
{
int num = rand() % 8;
putwchar(str[num]);//输出字符 }
// printf("我i回复");
system("pause");} // 编译器什么也不打印,可以用printf打印汉子
#include <stdlib.h>
#include<time.h>
#include <locale.h>
void main() //随机起名器
{
setlocale(LC_ALL, "zh-CN");
wchar_t str[8] = { L'龙', L'虎', L'大', L'伟', L'天', L'桂', L'三', L'财' };
//putwchar(str[0]);
time_t times;
srand((unsigned int)time(×));//取随机数种子
int length = rand() % 2 +1;//6-15
putwchar(L'吴'); for (int i = 0; i < length; i++)
{
int num = rand() % 8;
putwchar(str[num]);//输出字符 }
// printf("我i回复");
system("pause");} // 编译器什么也不打印,可以用printf打印汉子
