生日快乐!
今天是10月27日周二,下周四是我生日,给自己写了个程序,祝我生日快乐,今天提前写好,就提前庆祝吧。为了庆祝放100分。
·
程序代码:
#include <stdio.h> #include <dos.h> int main(void) {int i,j,k,n,M=-2; char ch,jin[][32]={ 1, 0, 1,0, 2, -128, 4, 64, 8, 32,18,24,33,-114, -64, -124, 0, 0, 31, -16, 0, 32, 0,32,0,64,0,64, 0, -128, 1, 0, 0, 0, 63,-4,1,0,1,0,1,0,1, 0,127,-2,1,0,1, 0, 2, -128, 2, 64 , 4, 32, 8,24,16,14,32,4, 64, 0, 0, 0, 15, -16, 8, 16, 15, -16, 8,16,15,-16,0,0, -1, -2, 1, 0, 9, 0, 9, -8, 9,0 ,21,0,35,0, 4, -2 , 0, 0, 6, 64 ,56 , 80 ,8 ,72 ,8, 72 ,8,64,-1,-2,8,64, 8, 72, 14, 40,56, 48, -56 ,32, 8, 80, 9, -110 ,8, 10, 40, 6, 16,2, 16,-128, 16,-128, 32 , -128, 124, -4,69,4,69, 4,70,4,124, -124 ,68, 68, 68, 100, 68, 36,68,4,124,4,68,40,64, 16, 0, 0, 0, -128, 16, -64, 16, -128, 16, -120, 31, -4,32, -128, 32, -128, 64, -120, -97,-4, 0, -128 ,0, -128, 0, -128 ,0, -128, 0, -124, 127,-2, 0,0,0,0,31, -16,16,16,16,16, 16,16,16,16,31,-16, 16,16,16,16,16,16,16, 16,16,16,31,-16,16,16, 0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,48,0,48, 0,16,0,32,0,0,0, 32,0,17,-8,17, 8,-3,8,5,8, 9,8,17, 8,57,-8, 84,-112, -108, -112,16,-112,16,-112,17,18, 17,18,18,18,20,14,6,64,56, 80,8,72,8,72,8,64,-1,-2,8, 64,8,72,14,40,56,48,-56,32, 8,80,9,-110,8,10,40,6,16,2, 0,-128,16,-64,16,-128,16,-120, 31,-4,32,-128,32,-128,64,-120, -97,-4,0,-128,0,-128,0,-128, 0,-128,0,-124,127,-2,0,0,0, 0,31,-16,16,16,16,16,16,16, 16,16,31,-16,16,16,16,16,16, 16,16,16,16,16,31,-16,16,16, 0,0,0,0,32,-128,32,-128,32, -128,55,-8,-88,-120,-88,-120, -96,-120,47,-2,32,-128,33,64, 33,64,33,32,34,16,34,24,36,14, 40,4,0,48,1,-8,31,0,16,-128, 16,-128,16,-128,63,-4,16,-128, 8,-128,12,-112,24,-120,48,-116, 36,-122,66,-124,1,0,0,0,},a[56]= {-61,0,0,0,-61,0,-61,-61,0,0,0, 102,0,-61,-61,60,60,66,60,102,-61,-61,102,102,-25,24, 102,-1,-61,48,-1,108,24,102,-61,-61,12,-64,120,24,102, -61,-25,102,102,112,24,126,-61,126,60,60,112,24,60,-61 };for(i=0;i<50;i++)printf("\n"); for(k=0;k<14;k++){ for(i=0;i<32;i++){if(i%2==0)printf(" "); ch=jin[k][i];for(j=0;j<8;j++){if(ch & 0x80)printf("%c", 3);else printf(" ");ch<<=1;}if((i+1)%2==0){delay(M), printf("\n");}}for(j=0;j<3;j++){delay(M);printf("\n");} }for(i=0;i<56;i++){ch=a[i];if(i%7==0){delay(M);printf (" ");}for(j=0;j<8;j++){if(ch & 0x80)printf ("%c",3);else printf(" ");ch<<=1;}if((i+1)%7==0)printf ("\n");}for(j=0;j<5;j++){delay(M);printf("\n");}getch();return 0;}