VC++写的程序 帮忙加点东西 谢谢
程序是这样的;#include"stdio.h"main(){intstr[10][8]={0x3c,0x18,0x18,0x18,0x18,0x18,0x18,0x3c...
程序是这样的;
#include "stdio.h"
main()
{
int str[10][8] = { 0x3c,0x18,0x18,0x18,0x18,0x18,0x18,0x3c, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x7e, 0x3c,0x42,0x42,0x42,0x42,0x42,0x42,0x3c, 0x42,0x42,0x42,0x24,0x24,0x24,0x18,0x18, 0x7e,0x02,0x02,0x3e,0x02,0x02,0x02,0x7e, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x42,0x42,0x24,0x24,0x18,0x18,0x18,0x18, 0x3c,0x42,0x42,0x42,0x42,0x42,0x42,0x3c, 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x3c}; int loop, loop2,loop3,tmp;
for(loop = 0;loop<8;loop++)
{
for(loop2 =0; loop2 < 10; loop2++ )
{
if (str[loop2][0]==0)
{ printf(" ");
}
else
{
tmp = str[loop2][loop];
for(loop3=0; loop3 <8; loop3++)
{
if(tmp%2 !=0)
{putchar('#');}
else
{putchar(' ');
}
tmp/=2;
}
}
}
putchar('\n');
}
printf("end");
getchar();
}
最后会显示 #拼出来的 I LOVE YOU
我现在前面加“超超”两字 也要用#拼出来的 要的效果是
超超
I LOVE YOU
希望大家帮帮忙 展开
#include "stdio.h"
main()
{
int str[10][8] = { 0x3c,0x18,0x18,0x18,0x18,0x18,0x18,0x3c, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x7e, 0x3c,0x42,0x42,0x42,0x42,0x42,0x42,0x3c, 0x42,0x42,0x42,0x24,0x24,0x24,0x18,0x18, 0x7e,0x02,0x02,0x3e,0x02,0x02,0x02,0x7e, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x42,0x42,0x24,0x24,0x18,0x18,0x18,0x18, 0x3c,0x42,0x42,0x42,0x42,0x42,0x42,0x3c, 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x3c}; int loop, loop2,loop3,tmp;
for(loop = 0;loop<8;loop++)
{
for(loop2 =0; loop2 < 10; loop2++ )
{
if (str[loop2][0]==0)
{ printf(" ");
}
else
{
tmp = str[loop2][loop];
for(loop3=0; loop3 <8; loop3++)
{
if(tmp%2 !=0)
{putchar('#');}
else
{putchar(' ');
}
tmp/=2;
}
}
}
putchar('\n');
}
printf("end");
getchar();
}
最后会显示 #拼出来的 I LOVE YOU
我现在前面加“超超”两字 也要用#拼出来的 要的效果是
超超
I LOVE YOU
希望大家帮帮忙 展开
1个回答
展开全部
#include "stdio.h"main(){ int str[10][8] = { 0x3c,0x18,0x18,0x18,0x18,0x18,0x18,0x3c, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x7e, 0x3c,0x42,0x42,0x42,0x42,0x42,0x42,0x3c, 0x42,0x42,0x42,0x24,0x24,0x24,0x18,0x18, 0x7e,0x02,0x02,0x3e,0x02,0x02,0x02,0x7e, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x42,0x42,0x24,0x24,0x18,0x18,0x18,0x18, 0x3c,0x42,0x42,0x42,0x42,0x42,0x42,0x3c, 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x3c}; int loop, loop2,loop3,tmp; for(loop = 0;loop<8;loop++) { for(loop2 =0; loop2 < 10; loop2++ ) { if (str[loop2][0]==0) { printf(" "); } else { tmp = str[loop2][loop]; for(loop3=0; loop3 <8; loop3++) { if(tmp%2 !=0) {putchar('#');} else {putchar(' ');} tmp/=2; } } } putchar('\n'); } printf("end"); getchar();}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询