题目描述
输入一行字符串,按特定字符‘-’截取。测试数据有多组,一次性输入与输出。
输入
暂无
输出
暂无
样例输入
123-asdfg-345
asdq--q12
123
---
样例输出
123
asdfg
345
asdq
null
q12
123
null
null
null
null
参考代码
#include<stdio.h>
#include<string.h>
int main()
{
char s[100];
int i;
while(gets(s))
{
i=0;
while(s[i]!='