鸢纸. 发表于 2022-7-18 17:55:48

带你学c带你飞课后作业:s1e3打印问题

#include <stdio.h>

int main()
{
        printf("\n\
                 @         \n\
                / \      \n\
                * *      \n\
                * *      \n\
                * *      \n\
          * * * * * *    \n\
          * * * * * * * *\n\
        * * * * * * * * * *\n\
                * *      \n\
                * *      \n\
              * * * *      \n\
          * * * * * *    \n\");
          return 0;
}




大佬们不懂就问为啥printf(“\n\出问题了{:5_107:}

临时号 发表于 2022-7-18 19:56:37

#include <stdio.h>

int main()
{
      printf("\n\
               @         \n\
                / \      \n\
                * *      \n\
                * *      \n\
                * *      \n\
            * * * * * *    \n\
          * * * * * * * *\n\
      * * * * * * * * * *\n\
                * *      \n\
                * *      \n\
            * * * *      \n\
            * * * * * *    \n");
            return 0;
}

ll.pc 发表于 2022-7-19 22:48:09

\n\是表示没有结束的意思

憨批皮卡 发表于 2022-7-21 00:23:35

最后的\n\要变成\n,不然编译器会认为你还没有结束

鸢纸. 发表于 2022-7-21 11:34:50

憨批皮卡 发表于 2022-7-21 00:23
最后的\n\要变成\n,不然编译器会认为你还没有结束

懂了懂了谢谢大佬{:10_323:}

憨批皮卡 发表于 2022-7-21 11:54:37

鸢纸. 发表于 2022-7-21 11:34
懂了懂了谢谢大佬

懂了就行{:5_95:}
页: [1]
查看完整版本: 带你学c带你飞课后作业:s1e3打印问题