0

When we input 'hello worls vxjjb ..' and output it ,it just prints 'hello'

How to print all of them?

4th Nov 2018, 1:17 PM
Shivam Gavandi
Shivam Gavandi - avatar
2 odpowiedzi
+ 5
4th Nov 2018, 3:08 PM
Hatsy Rei
Hatsy Rei - avatar
+ 12
1)take whole input as String type. 2)separate each word from the sentence by identifying spaces between them , take them in a String array ... now U can print elements of array + U get all words separately OR if U just want to print , then just run a loop on "whole sentence" & whenever a space comes , print "\n" to get into next line
4th Nov 2018, 1:26 PM
Gaurav Agrawal
Gaurav Agrawal - avatar