The New Line
Submissions: 13019   Accuracy:

54.02%

  Difficulty: Easy   Marks: 2
Associated Course(s):   Fork CPP   Placement 100

You are familiar with producing output using CPP. In this task, you'll be required to write three messages in three separate lines. Write Geeks for Geeks. But wait a minute!! You need to write each word of it in a separate line.
In the function printInNewLine(), output each word of Geeks for Geeks in a separate line.
Hint: endl might be useful here!

Input:
No input

Output:
Geeks
for
Geeks

Explanation:
First word of the statment is in first line, next word is in next line, and last is in last line.

 

** For More Input/Output Examples Use 'Expected Output' option **

Author: Dhiman Mayank


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.