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

作者: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;
}

C++ (生成二维码,扫描有惊喜)_第1张图片

你可能感兴趣的:(c++,情书,ジ﹋★☆『,己,卟,話,』)