Computer Science, asked by alveenamahfooz626, 5 days ago

write a program to enter a sentence print the each word in separate line​

Answers

Answered by palakd488
0

#include<stdio.h>

#include<stdio.h>int main()

#include<stdio.h>int main(){

#include<stdio.h>int main(){ int i;

#include<stdio.h>int main(){ int i; char s[100];

#include<stdio.h>int main(){ int i; char s[100]; scanf("%s", s);

#include<stdio.h>int main(){ int i; char s[100]; scanf("%s", s); for(i=0; s[i]!='\0'; i++)

#include<stdio.h>int main(){ int i; char s[100]; scanf("%s", s); for(i=0; s[i]!='\0'; i++) {

#include<stdio.h>int main(){ int i; char s[100]; scanf("%s", s); for(i=0; s[i]!='\0'; i++) { printf("%c", s[i]);

#include<stdio.h>int main(){ int i; char s[100]; scanf("%s", s); for(i=0; s[i]!='\0'; i++) { printf("%c", s[i]); if(s[i]==' ')

#include<stdio.h>int main(){ int i; char s[100]; scanf("%s", s); for(i=0; s[i]!='\0'; i++) { printf("%c", s[i]); if(s[i]==' ') {

#include<stdio.h>int main(){ int i; char s[100]; scanf("%s", s); for(i=0; s[i]!='\0'; i++) { printf("%c", s[i]); if(s[i]==' ') { printf("\n");

#include<stdio.h>int main(){ int i; char s[100]; scanf("%s", s); for(i=0; s[i]!='\0'; i++) { printf("%c", s[i]); if(s[i]==' ') { printf("\n"); }

#include<stdio.h>int main(){ int i; char s[100]; scanf("%s", s); for(i=0; s[i]!='\0'; i++) { printf("%c", s[i]); if(s[i]==' ') { printf("\n"); } }

#include<stdio.h>int main(){ int i; char s[100]; scanf("%s", s); for(i=0; s[i]!='\0'; i++) { printf("%c", s[i]); if(s[i]==' ') { printf("\n"); } }}

Hope it helps u have a good day ahead

Answered by gsanjaykumar690
0

Answer:

1

Take the string.

2

Break the string into words with the help of split() method in String class. ...

3

Traverse each word in the string array returned with the help of Foreach loop in Java. ...

4

Calculate the length of each word using String. ...

5

If the length is even, then print the word.

Similar questions