自娱自乐中秋快乐代码

欢迎前往个人搭建博客Five-great的博客



自娱自乐 中秋快乐 代码

要求:需要 程序运行窗口 字体大小为 5 并且全屏

也可自行调节。

效果如图:


代码:

#include<stdio.h>
#include<string.h>
//中秋快乐 (16*16点字形码)
unsigned char a[16*10]={
0x01,0x00,0x08,0x40,0x10,0x80,0x00,0x20,0x00,0x00,0x01,0x00,0x1C,0x40,0x10,0x80,
0x00,0xF0,0x01,0x80,0x01,0x04,0xF0,0x40,0x10,0x80,0x1F,0x00,0x03,0xC0,0x7F,0xFE,
0x10,0x40,0x10,0x88,0x10,0x00,0x03,0xC0,0x41,0x04,0x11,0x44,0x5B,0xFC,0x11,0x00,
0x03,0xC0,0x41,0x04,0xFD,0x4C,0x54,0x88,0x11,0x00,0x03,0xC0,0x41,0x04,0x11,0x50,
0x50,0x88,0x21,0x04,0x03,0xC0,0x41,0x04,0x32,0x40,0x90,0x88,0x7F,0xFE,0x01,0x80,
0x7F,0xFC,0x38,0x40,0x10,0x88,0x01,0x00,0x01,0x80,0x41,0x04,0x54,0xA0,0x1F,0xFE,
0x01,0x00,0x01,0x80,0x01,0x00,0x50,0xA0,0x10,0x80,0x09,0x20,0x00,0x00,0x01,0x00,
0x91,0x10,0x11,0x40,0x09,0x10,0x01,0x80,0x01,0x00,0x11,0x08,0x11,0x20,0x11,0x08,
0x03,0xC0,0x01,0x00,0x12,0x0E,0x12,0x10,0x21,0x0C,0x01,0x80,0x01,0x00,0x14,0x04,
0x14,0x0E,0x45,0x04,0x00,0x00,0x01,0x00,0x18,0x00,0x18,0x04,0x02,0x00,0x00,0x00
};
//想吃月饼 (16*16点字形码) 
unsigned char a1[16*10]={
0x10,0x08,0x00,0x80,0x00,0x10,0x20,0x00,0x00,0x00,0x11,0xFC,0x08,0x80,0x0F,0xF8,
0x21,0x08,0x00,0x00,0x11,0x08,0x7C,0x88,0x08,0x10,0x20,0x90,0x07,0xF0,0xFF,0x08,
0x48,0xFC,0x08,0x10,0x3C,0x00,0x18,0x18,0x11,0xF8,0x49,0x00,0x08,0x10,0x47,0xFC,
0x30,0x0C,0x31,0x08,0x4A,0x00,0x0F,0xF0,0x48,0x90,0x38,0x0C,0x39,0xF8,0x4D,0xF8,
0x08,0x10,0xA0,0x90,0x00,0x38,0x55,0x08,0x48,0x10,0x08,0x10,0x20,0x94,0x00,0xE0,
0x91,0x08,0x48,0x20,0x08,0x10,0x27,0xFE,0x00,0xC0,0x11,0xF8,0x48,0x40,0x0F,0xF0,
0x20,0x90,0x00,0x80,0x00,0x00,0x48,0x80,0x08,0x10,0x20,0x90,0x00,0x00,0x12,0x00,
0x79,0x00,0x08,0x10,0x24,0x90,0x00,0x00,0x51,0x84,0x4A,0x02,0x10,0x10,0x28,0x90,
0x01,0x80,0x50,0x92,0x02,0x02,0x10,0x10,0x31,0x10,0x03,0xC0,0x90,0x12,0x01,0xFE,
0x20,0x50,0x22,0x10,0x01,0x80,0x0F,0xF0,0x00,0x00,0x40,0x20,0x04,0x10,0x00,0x00,};

int zh(int x){

    int b[8]={0};int i=0;
    while(x)
    {b[i++]=x%2;
       x=x>>1;    
    }
    for(i=7;i>=0;i--)
    if(b[i]) printf("来1503");
    else printf("      ");
    //printf("\t"),printf("\t"),printf("\t"),printf("\t"),printf("\t");
}
int main()
{
    int i;
    for(i=0;i<16*10;i++)
      { if(i%10==0)printf("\n\n\n");
         zh(a[i]);
      }
      printf("\n\n\n");
      for(i=0;i<16*10;i++)
      { if(i%10==0)printf("\n\n\n");
         zh(a1[i]);
      }
    return 0;
}


  目录