// demo.cpp : 定义控制台应用程序的入口点。
//
#include "iostream"
#include "stdafx.h"
#include "stdlib.h"
using namespace std;
int main()
{
int hc=6901234;//高七位
int lc=567892;//六位
int c[13];
int azj[70]={0,0,0,1,1,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,1,0,1,1,1,1,0,1,0,1,0,0,0,1,1,0,1,1,0,0,0,1,0,1,0,1,1,1,1,0,1,1,1,0,1,1,0,1,1,0,1,1,1,0,0,0,1,0,1,1};
int bzj[70]={0,1,0,0,1,1,1,0,1,1,0,0,1,1,0,0,1,1,0,1,1,0,1,0,0,0,0,1,0,0,1,1,1,0,1,0,1,1,1,0,0,1,0,0,0,0,1,0,1,0,0,1,0,0,0,1,0,0,0,1,0,0,1,0,0,1,0,1,1,1};
int czj[70]={1,1,1,0,0,1,0,1,1,0,0,1,1,0,1,1,0,1,1,0,0,1,0,0,0,0,1,0,1,0,1,1,1,0,0,1,0,0,1,1,1,0,1,0,1,0,0,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,0,1,1,1,0,1,0,0};
int qzm[10][6]={{1,1,1,1,1,},{1,1,2,1,2,2},{1,1,2,2,1,2},{1,1,2,2,2,1},{1,2,1,1,2,2},{1,2,2,1,1,2},{1,2,2,2,1,1},{1,2,1,2,1,2},{1,2,1,2,2,1},{1,2,2,1,2,1}};
/*for (int i=0;i<70;i++)
{
printf("%d",bzj[i]);
}*/
//this program powered by tance
for (int i=0;i<7;i++)
{
c[6+i]=hc%10;
hc=hc/10;
}
for (int i=0;i<6;i++)
{
c[i]=lc%10;
lc=lc/10;
}
int qzm1=c[12];
int case1[6];
for (int i=0;i<6;i++){
case1[i]=qzm[qzm1][i];
}
int q[113]={0};//初始化输出
for (int i=0;i<11;i++)
{
q[i]=0;
q[11]=1;
q[12]=0;
q[13]=1;
}//左侧空
for (int i=0;i<6;i++)
{
int q1[7];
int temp=c[11-i];
int temp1=case1[i];
switch(temp1){
case 1:for (int n=0;n<7;n++)
{
q1[n]=azj[temp*7+n];
}
break;
case 2:for (int n=0;n<7;n++)
{
q1[n]=bzj[temp*7+n];
}
break;
}
for (int j=0;j<7;j++)
{
q[14+i*7+j]=q1[j];
q[56]=0;
q[57]=1;
q[58]=0;
q[59]=1;
q[60]=0;
}
}
for (int i=0;i<6;i++)
{
int q1[7];
int temp=c[5-i];
for (int j=0;j<7;j++)
{
q[61+i*7+j]=czj[temp*7+j];
}
q[103]=1;
q[104]=0;
q[105]=1;
}
for (int i=0;i<13;i++)
{
printf("%d",i);
}
for (int i=13;i<61;i++)
{
if ((i)%7==0)
printf("----%d\n",i);
printf("%d",q[i]);
}
for (int i=61;i<113;i++)
{
if ((i-61)%7==0)
printf("----%d\n",i);
printf("%d",q[i]);
}
system("pause");
return 0;
}
基于VS2010编辑,