#include <stdio.h>
#include <string.h>
int main(void)
{
char s[30];
int i;
printf("Enter a sentence: ");
gets(s);
for (i = 0; i < strlen(s); i++)
{
if (s[i] != ' ')
printf("%c", s[i]);
else
printf("\n");
}
return 0;
}
/*
run:
Enter a sentence: I Love To Code In C
I
Love
To
Code
In
C
*/