We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • HackerRank Home

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Hiring developers?
  1. Prepare
  2. C
  3. Arrays and Strings
  4. Printing Tokens

Printing Tokens

Problem
Submissions
Leaderboard
Discussions
Editorial
  1. Prepare
  2. C
  3. Arrays and Strings
  4. Printing Tokens
Exit Full Screen View
  • Problem
  • Submissions
  • Leaderboard
  • Discussions
  • Editorial

Given a sentence, , print each word of the sentence in a new line.

Input Format

The first and only line contains a sentence, .

Constraints

Output Format

Print each word of the sentence in a new line.

Sample Input 0

This is C 

Sample Output 0

This
is
C

Explanation 0

In the given string, there are three words ["This", "is", "C"]. We have to print each of these words in a new line.

Sample Input 1

Learning C is fun

Sample Output 1

Learning
C
is
fun

Sample Input 2

How is that

Sample Output 2

How
is
that
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy