Editorial for Lấy từ
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
void solve()
{
char s1[100];
fgets(s1, sizeof(s1), stdin);
char newstr[100];
for(int i = 0; i < strlen(s1); i++){
if(s1[i]!= ' '){
int id = 0;
while(i < strlen(s1) && s1[i]!= ' '){
newstr[id] = s1[i];
i++;
id++;
}
newstr[id] = '\0';
show(newstr);
char c[100];
strcpy(newstr, c);
}
}
}
Comments