} 稳{:10_279:} Sboy 发表于 2017-1-17 16:22
受益匪浅
物欲时代一条清流里的野生 小甲鱼
物欲时代一条清流里的野生 小甲鱼 懂了又好像没懂,会写又好像不会写 Sboy 发表于 2017-1-17 16:22
受益匪浅
物欲时代一条清流里的野生 小甲鱼
{:5_91:} 好好学习才能天天向上! 小甲鱼!请问您可以更新一下函数整理那个帖子的内容吗?谢谢! {:10_334:} #include<stdio.h>
void blank(int a)//创建空格间隔功能
{
int i;
for(i=0;i<a;i++)
{
printf(" ");
}
}
int main()
{
char c={{"########","## ","## ","######","## ","## ","## "},
{"####"," ## "," ## "," ## "," ## "," ## ","####"},
{" ###### ","## ##","## "," ###### "," ##","## ##"," ###### "},
{"## ##","## ##","## ##","########","## ##","## ##","## ##"},
{" ###### ","## ##","## ","## ","## ","## ##"," ###### "}};
int i,j;
int a;
printf("请输入字母的间隔(空格数):");
scanf("%d", &a);
for(j=0;j<7;j++)
{
for(i=0;i<5;i++)
{
printf("%s",c);
blank(a);
}
putchar('\n');
}
return 0;
}
课后作业最后那题答案也太奇怪了,都不用建立函数吗,起码建立一个空格间隔的功能吧{:10_285:},这不是函数学习吗 开始上难度了{:10_245:}
页:
1
[2]