#include <stdio.h>
int main() {
char sentence[1000];
int i;
fgets(sentence, sizeof(sentence), stdin);
// Iterate through each character of the sentence
for (i = 0; sentence[i] != '\0'; i++) {
// If the current character is a space or newline, print a new line
if (sentence[i] == ' ' || sentence[i] == '\n') {
printf("\n");
}
else {
// Print the character if it's not a space or newline
printf("%c", sentence[i]);
}
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: