关于课后作业打印一架飞机
为什么我的代码明明一样了可运行出来总是有很多空缺的地方这是我的#include <stdio.h>
int main()
{
printf("\n\
@\n\
/ \\\n\
* *\n\
* *\n\
* *\n\
* * * * * *\n\
* * * * * * * *\n\
* * * * * * * * * *\n\
* *\n\
* *\n\
* * * *\n\
* * * * * *\n");
return 0;
}
这是小甲鱼写的正确的,明明没啥区别呀。。
#include <stdio.h>
int main()
{
printf("\n\
@\n\
/ \\\n\
* *\n\
* *\n\
* *\n\
* * * * * *\n\
* * * * * * * *\n\
* * * * * * * * * *\n\
* *\n\
* *\n\
* * * *\n\
* * * * * *\n");
return 0;
}
因为你在各行的星之前用的是tab,每个编译器的tab可能是不一样的。改成空格应该就行了。 诶代码打上来就变了样子了。。
明明我在编译器里边是这样的 把所有tab全部清掉,用空格一格一格占位就行了
页:
[1]