sdut oj 3730 字符串分割

sdut oj 3730 字符串分割#include <stdio.h>
#include <string.h>


int main()
{
    char str[1005], y;
    int i, x;
    while(~scanf("%s %c",str,&y))
    {
        x = strlen(str);
        for(i = 0; i <= x - 1; i++)
        {
            if(str[i] == y)
                printf("\n");
            else
                printf("%c", str[i]);
        }
        printf("\n");
    }
    return 0;
}