萨小坡


私信TA

用户名:chenxinpo123

访问量:10007

签 名:

等  级
排  名 253
经  验 5784
参赛次数 0
文章发表 16
年  龄 0
在职情况 学生
学  校 温州大学瓯江学院
专  业

  自我简介:

解题思路:





注意事项:





参考代码:

#include <stdio.h>


int main()

{

    char ch[1000];

    int N;

    int i = 0,j = 0;

    scanf("%d",&N);

    getchar();

    while(gets(ch) != 0)

    {

        if(i < N)

        {

            printf("%s\n\n",ch);

        }

        else

        {

            j = 0;

            while(ch[j] != '\0')

            {

                if(ch[j] == ' ' || ch[j] == '\n')

                {

                    printf("\n");

                    printf("\n");

                }

                else

                {

                    printf("%c",ch[j]);

                }

                j++;

            }

            printf("\n");

            printf("\n");

        }

        i++;

    }

    return 0;

}


 

0.0分

0 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换

万能编程问答

代码解释器

  评论区