0
When we input 'hello worls vxjjb ..' and output it ,it just prints 'hello'
How to print all of them?
2 Respostas
+ 5
You are looking for getline().
https://code.sololearn.com/cEouDexAzRiM/?ref=app
+ 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