求C++代碼輸出大字
求C++大佬編一段程序輸出“再見,,張溪純”5個(gè)大字,用*組成,,在逗號(hào)處換行,,謝謝!
程序參考如下:
#include <stdio.h>void disp(unsigned char (*data)[32], int n){int i, j, k, t;unsigned char c;for (i = 0; i < 16; i++){for (j = 0; j < 2 * n; j++){c = data[j / 2][i * 2 + j % 2];for (k = 0; k < 8; k++)if (c & (0x80 >> k))printf("*");elseprintf(" ");}printf("");}}int main(){unsigned char c;unsigned char data[2][32] = {{0x00, 0x08, 0x7f, 0xfc, 0x01, 0x00, 0x01, 0x10, 0x1f, 0xf8, 0x11, 0x10, 0x11, 0x10, 0x1f, 0xf0, 0x11, 0x10, 0x11, 0x14, 0xff, 0xfe, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x50, 0x10, 0x20},{0x00, 0x10, 0x1f, 0xf8, 0x10, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x12, 0x10, 0x12, 0x90, 0x04, 0x80, 0x04, 0x82, 0x08, 0x82, 0x30, 0x7e, 0xc0, 0x00}};unsigned char data1[3][32] = {{0x09, 0x00, 0xfd, 0x08, 0x09, 0x08, 0x09, 0x10, 0x09, 0x20, 0x79, 0x40, 0x41, 0x04, 0x47, 0xfe, 0x41, 0x40, 0x79, 0x40, 0x09, 0x20, 0x09, 0x20, 0x09, 0x10, 0x09, 0x4e, 0x51, 0x84, 0x21, 0x00},{0x40, 0x1c, 0x37, 0xe0, 0x12, 0x48, 0x01, 0x50, 0x80, 0x80, 0x61, 0x10, 0x23, 0xf8, 0x08, 0x40, 0x10, 0x84, 0x27, 0xfc, 0xe0, 0x40, 0x3f, 0xfe, 0x20, 0xa0, 0x21, 0x10, 0x22, 0x0e, 0x2c, 0x04},{0x10, 0x40, 0x10, 0x40, 0x20, 0x44, 0x27, 0xfe, 0x48, 0x40, 0xfa, 0x48, 0x12, 0x48, 0x22, 0x48, 0x42, 0x48, 0xfb, 0xf8, 0x42, 0x48, 0x00, 0x40, 0x18, 0x42, 0xe0, 0x42, 0x40, 0x3e, 0x00, 0x00}};disp(data, 2);disp(data1, 3);return 0;}
結(jié)果