#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
#define SIZE 40
char* s_gets(char*, int);
int main(void)
{
char st[SIZE];
int n = 0;
while (n < 3) {
puts(s_gets(st, 10));
n++;
}
return 0;
}
char* s_gets(char* st, int n)
{
char c;
int i=0;
for(i=0;i<n;i++)
{
st[i] = getchar();
if (isblank(st[i]) ||st[i]=='\n')
break;
}
if(st[i]!='\n')
while (getchar() != '\n')
continue;
st[i] = '\0';
return st;
}