C++ (生成二维码,扫描有惊喜)

论坛 期权论坛 脚本     
匿名技术用户   2020-12-21 16:26   31   0
作者:Amber
链接:https://www.zhihu.com/question/37867602/answer/113598593
来源:知乎

#include
#include
int main()
{
int i,j;
unsigned int iterator,currentIndex=0;
unsigned int block=32936;
unsigned int blank = 8224;
unsigned int prompt[6] = { 3151145161, 3268389065, 3300255427,2899246774, 3131304898, 10 };
unsigned intmatrix[14]={4266392596,2423165115,1965415331,2931913991,4205830151,16502099,
2689950357,138955494,2133885007,3824925904,1133361902,232156718,2769356099,3488548096};

system("color f0");

printf("%s", prompt);
for (i = 0; i<441;)
{
iterator = 1 << 31;
for (j = 0; j < 32; j++)
{
i++;
if ((matrix[currentIndex] & iterator) == iterator)
{
printf("%s",&block);
}
else
{
printf("%s", &blank);
}
if (i % 21 == 0)
{
printf("\n");
}
iterator >>= 1;
if (i == 441)
{
break;
}
}
currentIndex++;
}

getchar();
return 0;
}



分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:7942463
帖子:1588486
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP